Simple if over age 13 too old back to number input screen if under 3 yrs old too young! Back to number input screen... However the loop is well.. ignored no matter what number is enter the loop breaks and keeps event moving not even a loop break added?
Loop wont... Loop?
RPG Maker MV SupportI think that your Transfer Event is IN the Loop, therefore It's going to do just that.
However, the loop is well. Ignored no matter what.
However, the loop is well ignored, no matter what.
However the loop is... well, ignored. No matter what number....
which one is it?
It should be like this:
Loop
Input Number
If Input Number >= 3
If Input Number < = 13
show Message "Well done! Let continue to do..."
Break Loop
Else
Else
Sorry but age must 3 < x < 13, please try again
End Loop
continue to run after this point if player input correct
Not quite. If the age is over 13, nothing will happen.
It should be like this:
It should be like this:
Code:
Loop
Input Number
If Number < 3
Too Yount
Else
If Number > 13
Too Old
Else
Okay, let's do this
Break Loop
End
End
End Loop
Transfer
This is correct thank you however i have a question i suppose about the code structure itself... why must If number < 13 be in the first ones 'Else' line? couldn't it be
If
var a = 1
var b = 2
var c = 3
eat the cheese
else throw the cheese
Because if it is less than 3, then it cannot also be greater than 13, so that line would never be executed unless it was in an Else block.
Fatality...
You cannot do
If
var a = 1
var b = 2
var c = 3
You have to do 3 conditional branches.
Code:
If var a = 1
If var b = 2
If var c = 3
Then what happens if var b is 2 and var c is 3, but var a is not 1? The second and third tests will never be performed, because the first one is not true.
However you are not checking 3 different variables. You are checking one variable for different values. The rules still hold though - if the tests are mutually exclusive (if age < 3, then age cannot be > 13, and if age > 13, then age cannot be < 3), so you can't nest the conditions, because if the first one is true, the second one will never be, and if the first one is false, the second condition will never be tested.
Original thread: https://forums.rpgmakerweb.com/threads/loop-wont-loop.103908/