Properly selecting a random party member though d20

(This is my first post, so please let me know if I missed something here.) (Edition is MV)
I'm trying to put negative repercussions on party abilities. For this instance, random party members might be blinded by a light-based move.
I have a d20, a DiceRoll variable in a DiceRoll common event that sets the number from 1 to 20. That's simple enough.
The trick is trying to call on random party members to be blinded. You can see in the screenshot that I tried to make it a kind of descending "if d20 is less than or equal to", with an else branch for the result. I can't seem to get party member 1 to show up as a result, and the party member called on a roll of, say, 10, come up null/0.
Is there a better way of doing this, or do I simply need to move around my If branches? I think I might need to make exclusions somehow, but am not sure how to approach that, either.
D20issues.PNG
what numbers are set in your diceroll event?
The diceroll variable is randomized in a range of 1 to 20.
Edit: *whenever the DiceRoll common event is called
but have you done that correctly? because the event where you gave the screenshot from should work correctly, so the error has to be somewhere else.
(That event is a bit convoluted, it could have been done without the else-branches and less commands with a bit restructure and a goto label command, but it still works correctly as far as I can see).

So we need to see both what happens before and after that to check the rest of the logic.
I don't think the issue is here. How would Jump to Label help with this system? I've only really used labels with loops so far.
The test NPC I made to test the output says "The result of the dice roll was \v[1] (like, say, 10, refering to this event's result). The party member chosen was \v[2] (This one refers to the Random Party Member event, see OP). If \v[1]=10 \v[2] errors and defaults to 0).
Dicerollvariable+common.PNG
Edit: *A correct result would be something like "The result of the dice roll was 19. The party member chosen was 1 (referring to Actor ID)."
If \v[1]=10 \v[2] errors and defaults to 0).
That is the info you should have given us - an error is something else than just not getting the result.

It sounds as if there is a problem with the data of the actors in the party - how did you determine which actors gets added? by plugin or by event?
And check which actor that is in the database.

One more question: do you test this events after loading a saved file or after starting a new game? Test it with a new game (important!!!)

EDIT: and by the way, 10 results in actor of party #2, not #1

Original thread: https://forums.rpgmakerweb.com/threads/properly-selecting-a-random-party-member-though-d20.94970/