Question about If, Else, Elif

Hi! So I decided to revise an old story I published because it’s awful and I hate it and I hate it being tied to my name, lol. I was looking through my old scripts and noticed that whenever I used flags, I would only use “if,” never “else,” or “elif.” Ex:

if(condition 1){

if(condition 2){

if(condition 3){


I guess it was easier for my stubborn brain to understand? The code works fine on my web previewer, but does anyone know if this is bad to do in practice? Will it cause glitches for players in the app? Thank you in advance!

If you do it like this, then it will go through each choice one after the other. So, if it matches the first one, it will do the first one. Then, it starts all over and goes to the second “if”.

But if you want it to go to the second “if” only if the first one is not a match, then you need to use “elif” or “else”.

Okay, thank you! And with that, I’ve seen some people have trouble with the else command; if the last option is elif instead of else, will that code still work :?

Yes. It will still work.

1 Like

Got it, thank you for all your help!
@Sydney_H may you please close? Thank you

1 Like

Closed by OP request. :smiley: