What is wrong with this piece of code? My guess is that it's an indentation error but I can't figure out what is wrong and where I've done the mistake

*choice 
  #Straight
    *set sexual_orientation "Straight"
    *if (gender) = "Male"
      *set partner_name "Emily"
      *set partner_gender "Female"
      *goto afterchoosingstraightsexualorientation
    *elseif (gender) = "Female"
      *set partner_name "Armand"
      *set partner_gender "Male"
      *goto afterchoosingstraightsexualorientation
  #Gay
    *set sexual_orientation "Gay"
    *if (sexual_orientation) = "Gay"
      *set partner_name "Armand"
      *set partner_gender "Male"
      *goto afterchoosinggaysexualorientation
  #Lesbian
    *set sexual_orientation "Lesbian"
    *elseif (sexual_orientation) = "Lesbian"
      *set partner_name "Emily"
      *set partner_gender "Female"
      *goto afterchoosinglesbiansexualorientation
  #Bisexual
    *set sexual_orientation "Bisexual"
    *goto afterchoosingbisexualsexualorientation
*label afterchoosingbisexualsexualorientation
Your current partner is a…
*choice 
  #Male 
    *set partner_name "Armand"
    *set partner_gender "Male"
    *goto afterchoosingbisexualpartnergender
  #Female
    *set partner_name "Emily"
    *set partner_gender "Female"
    *goto afterchoosingbisexualpartnergender
*label afterchoosingstraightsexualorientation
*label afterchoosinggaysexualorientation
*label afterchoosinglesbiansexualorientation
*label afterchoosingbisexualpartnergender```

This would be the correct indentation, though you have other problems with the if/else commands

I suggest you to take a look at this post.

2 Likes