Needing help with a variable affected by another variable through a choice

I’m having trouble with a variable that is affected by a choice and another variable.

If anyone else had a similar question and that got resolved, I am sorry, I tried finding something similar to mine but couldnt find it!

The error I’m getting is “It is illegal to fall out of a choice statement you must goto or finish before the end of the intended block”

My code looks like this

  *choice
   #You remember when you first noticed the female pupils. Like really noticed, when you couldnt turn your eyes away from them, noticing silly little details you never thought about before.
     *if "male" = true 
      *set sex "hetero"
       *goto noromo
     *if "trans_male" = true
      *set sex "lesbian"
       *goto noromo
     *if "trans_female" = true
      *set sex "hetero"
       *goto noromo
     *if "female" = true
      *set sex "lesbian"
       *goto noromo  

I also tried it like that, got the same error

     *if "female" = true
     *set sex "lesbian"
     *goto noromo  

And like that
       *if "female" = true
       *set sex "lesbian"
         *goto noromo  
      

However I also have bad eyesight, even using cside and its handy numbers I struggle with the intendation and always need to triplecheck so that could also be the cause of the error!

The easy way to fix this is to replace choice with fake choice. I’m on my phone right now and can’t delve into the details of a more elegant solution. But I can elaborate later if no one gives you a more detailed explanation.

Also for spotting indentation errors easier, consider indenting with tabs instead of spaces.

1 Like

From what you posted you have the *set and *goto on different indentations they should be.

*choice
  #option.
    *set variable true
    *goto next_scene

Also I’d male/female etc are true or false you can just do

*if (male)

1 Like

Thx, I just tried it and got the same error so I am going to go with the fake_choice :sweat_smile: still thank you for your help!

This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.