Roll not stopping when it needs to..

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Jacobvp0804

Member
Jan 26, 2017
12
0
0
22
Denmark
Skript Version: Skript 2.2 Fixes V8b
Skript Author: Njol
Minecraft Version: 1.8

Full Code: Click here
Erros on Reload:
None
Console Errors: None


Other Useful Info:

What I want fixed: Whenever you start a crash (/bet (amount of money) it starts counting up to a certain amount, whenever it hits the same as a variable it's meant to stop. But It wont stop.

Addons using (including versions):
WildSkript 1.8 - SkQuery 3.21.4

Troubleshooting:

Have you tried searching the docs? Yes
Have you tried searching the forums? Yes
What other methods have you tried to fix it? I've tried chaning the number to an integer instead, still wont work.

Information: When the roll starts and till it ends the variable that it will crash at will be broadcasted and can be checked by using the /sidsteseed - then copying the number into /checkroll (seed)
^^ If you wanted to check it ^^
 
Alright, this one was pretty non sense.
I could not parse any of the values as number of integer (I sincerely have no idea why). So get their texts and parse them as number, or simply use an if comparing two texts.

Your code has no "stops", so even if it worked, it wouldn't stop xD

e.g.
Code:
if "%{MCCRASH::RUN::CRASH::%{_p}%}%" is "%{_run}%":
    stop loop # You forgot this too

OR

Code:
if "%{MCCRASH::RUN::CRASH::%{_p}%}%" parsed as number is "%{_run}%" parsed as number:
    stop loop # You forgot this too

Also, if {MCCRASH::RUN::CRASH::%{_p}%} is 0, it won't stop too, because it will add 0.01 to {_run} before comparing, so {_run} will start at 0.01 and will never be the value you want. You can either add 0.01 after the 'if' statement, or compare {_run} to {MCCRASH::RUN::CRASH::%{_p}%} - 0.01.

Dayum, hope you understand this.
Good luck ;P (I had to use this because these emoticons are incredibly ugly)
 
Alright, this one was pretty non sense.
I could not parse any of the values as number of integer (I sincerely have no idea why). So get their texts and parse them as number, or simply use an if comparing two texts.

Your code has no "stops", so even if it worked, it wouldn't stop xD

e.g.
Code:
if "%{MCCRASH::RUN::CRASH::%{_p}%}%" is "%{_run}%":
    stop loop # You forgot this too

OR

Code:
if "%{MCCRASH::RUN::CRASH::%{_p}%}%" parsed as number is "%{_run}%" parsed as number:
    stop loop # You forgot this too

Also, if {MCCRASH::RUN::CRASH::%{_p}%} is 0, it won't stop too, because it will add 0.01 to {_run} before comparing, so {_run} will start at 0.01 and will never be the value you want. You can either add 0.01 after the 'if' statement, or compare {_run} to {MCCRASH::RUN::CRASH::%{_p}%} - 0.01.

Dayum, hope you understand this.
Good luck ;P (I had to use this because these emoticons are incredibly ugly)

I actually recreated it 'cause I've had the error for a long time, I had 'stop' in the old version but it stopped working aswell.. Thanks for the help though :emoji_grinning:
 
Status
Not open for further replies.