Script help! Flags, if/elif/else

Oh damn, does it also work with <,>?

seems so

this worked

@CHAR1 =1
@CHAR2 =1

if (CHAR1 <2 and CHAR2 >0){
NARR
It works

}else {
NARR
Something went wrong
}

1 Like

That’s gonna be super helpful in the future!
Thanks!! :star_struck:

1 Like

There is just one thing - remember the script reads the conditions from top to bottom and it will go the the first condition it fitst and never try the next one so this is the only tricky part - always have to put the complicated unique combinations on top and the simple on bottom…

or if you will do it with point for example having 10 points and conditions bigger then

3
5
9
12

it will jum to the 1 condition actually because 10 is bigger then 3

Yeah, noticed that, it’s so annoying.
So it also applies when you’re using if/elif/else with multiple choice names?

the principle thst it reads from the first line and will let reader to go to first fitting condition is general rule of if/elif/else

if I would write the conditions vice versa like that:

A
B
C
A B
B C
A C
A B C

than all A , A B , A B C would end up at the firt condition…because it fits you have A and the sctipt will never try the othe options - so you would never get to the ABC option actually

1 Like

Marked as solved by thread Op @AnnSza :yay: Thanks to @Farah_DeSantis @Natasha_Darkforce & @Dara.Amarie for the help :v: