Best way to handle a If() Common Event? [SOLVED]

Now I have it working ok, but I wanted to know if it is ok or what is the best way to handle an If > something. Since I don't see an elseif().

Code:
In Common Events. NPC Guard
If > Variable [Male] = 1
Show Text Option
Exit Event Processing
End

If > Variable [Female] = 1
Show Text Option
Exit Event Processing
End
//In case No Gender is Set
If > Variable [Male] = 0
Show Error Text Option
Exit Event Processing
End

If > Variable [Female] = 0
Show Error Text Option
Exit Event Processing
End

//Chat Options
If GenderSwitchM = ON
Show Dialogue Options: Male
[Options]
Random stuff.
Else


End


If GenderSwitchF = ON
Show Dialogue Options: Female
[Options]
Random stuff.
Else


End

And on the NPC Event, I call the Common Event. It all works fine.
But not sure if there is a better way to handle this, or is it ok?
The conditional branch command has an "else" checkbox, you can nest additional branches inside those.
1) the else-branch will be activated by the check box on the very bottom of the conditional branch window. It is deactivated by default because it has been proven again and again that most structures are better written without - but it can easily activated that way for those structures that need it.

2) that said, most male/female decisions are better handled by switch (male = on, female = off) for a number of reasons.

edit: ninja'd
The conditional branch command has an "else" checkbox, you can nest additional branches inside those.
Yeah I see that, and use if, else, but it's not an if > elseif value = 1 statement.
I'm used to php calls, I don't think MZ handles it the same way. Like

Code:
if (Switch Female = 1 && Switch Male = 0){
do this, stuff.
Else
error text [No Value Set]
end.
}
Or even
if (Switch Female = 1){
Girls Text stuff.
Elseif Switch Male = 0
Guys Text Here
Else
Error text [No Value Set]
end.
}

Edit: So it's all in one call, and the final else is the no gender set error.
Type of thing, if that makes sense? Sorry I don't brain well on Mondays lol that's why I set it to each one having a if = something.
So when I check each one, if I do it with the else branch it messes up "Or I don't get it" and it shows the else value + along with the 0 ones.

1) the else-branch will be activated by the check box on the very bottom of the conditional branch window. It is deactivated by default because it has been proven again and again that most structures are better written without - but it can easily activated that way for those structures that need it.

2) that said, most male/female decisions are better handled by switch (male = on, female = off) for a number of reasons.

edit: ninja'd
Yes I do have a switch, but ran into the same issue.
you don't need an elseif because the conditional branches can be nested

if
...
else
>>if
>>...
>>else
>>>>if
you don't need an elseif because the conditional branches can be nested

if
...
else
>>if
>>...
>>else
>>>>if
I did try that, but it was not working, huh I'll try it again and see thanks.
I did try that, but it was not working, huh I'll try it again
if it wasn't working, then most likely you messed up the positioning of the different commands.
that is one of the many reasons why we prefer screenshots of events instead of the textcode of the command like you gave above - the indentions will show anyone who knows how to read them if your commands are on the correct level, and those indentions usually get lost in the text descriptions.
Ok, I did get it working this time nesting it with just 2 checks, and one else error. I must have miss typed something the last time I did it. /Facepalm

if it wasn't working, then most likely you messed up the positioning of the different commands.
that is one of the many reasons why we prefer screenshots of events instead of the textcode of the command like you gave above - the indentions will show anyone who knows how to read them if your commands are on the correct level, and those indentions usually get lost in the text descriptions.
Yes, I must have made a mistake the first time. It's ok now just tested it.
I'll just blame my MZ, it's haunted lol.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/best-way-to-handle-a-if-common-event-solved.138444/