Any explanation on why Else branches work this way

I was having a problem where I made an else branch

bassically with my conditional branch:

If switch xyz turned on
give item
ELSE
if abc turned on
give item

I found that if ABC was turned on, i didnt get the item.. I got the item if XYZ was turned on, as it was the first part of the conditional check

But if I only modified this one part to instead say

If switch xyz turned on
give item
if abc turned on
give item

I didnt touch ANY other part of the programming

I got the item how I thought the first one would give it to me.

Is this a bug or am I just not understanding how ELSE works?
please give a screenshot or copypaste, it's basically impossible to debug code without seeing it
I'm assuming they were two different items.
In order to reach the second conditional that is inside of the 'Else' condition, the first conditional statement must be false. Meaning you would get the item only if xyz was off and abc was on. Otherwise, if xyz is turned on, you won't ever reach the else branch, and thus never reach the second conditional.

The reason the second version worked for you would be because they are independent statements. Neither is a part of the other. An else statement is part of a conditional branch.

The second version could have both of them pass or both of them fail, as they are independent
Sorry guys, I found the problem. I was making a class selection thing, and for some reason I had one of the choices turned on as a switch before they ever selected the class so that class was always on even if they picked a different one, which broke the thing that was broken,. after turning it off the Else statement worked.

I only found it by using the switch searcher on all my class options. Handy tool

ive only had RMMV for a week, sorry for the trash thread.
There's no harm in asking questions, even if you figure out the answer yourself. Thank you for posting your answer for others who may be having issues with the same thing.

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/any-explanation-on-why-else-branches-work-this-way.110970/