No selectable options error

Hey,
I’m having another *if problem. The error description is below the code.

*label allen
You approch the door and gently push the door open. It wasn't even locked, you mutter to yourself as you quietly enter the apartment.
You enter the living room - and the source of the noise is very clear now.
*page_break
Your heart stops beating for a moment as you find yourself standing a few meters away from anther person, which seems to be punching a wooden door
in front of him. Before you can do anything the man turns around and starts moving directly towards you. You notice he looks very sick - pale skin,
red eyes, small pupils, heavy breathing, and a few bruises under the right eye. You take a slow, calm step back, and just as you're about to speak 
the man launches at you. You must act fast.
*choice
     *if (fire_axe) #Attack the man with your fire axe.
      *set body_count +1
      You manage to grab your fire axe moments before the attacker reaches you. You use the metal handle to deflect the wild overhand fist thrown at you
and land a strike directly on the nose. The man staggers for a moment before you swing the axe at his head, hitting his right temple. He releases a 
deep growl and attempts to strike back just as you hit his forehead. You hear a sickening sound as the blade crackes the attacker's skull, spraying blood
all over your shirt. A short moment passes before the man falls to the ground, and a red puddle begins forming around his head.
*page_break
*goto allen2
     *if (baseball_bat) #Attack the man with your baseball bat.
      *set body_count +1
      You manage to grab your baseball bat moments seconds before the attacker reaches you. You use the wooden handle to deflect the wild overhand fist thrown at you
and land a quick strike to to jaw. The man staggers for a moment before you swing the bat directly at his face, crushing his nose. He releases a 
deep growl and attempts to strike back just as you hit his forehead. You hear a sickening sound as the bat crackes the attacker's skull, spraying blood
all over your shirt. A short moment passes before the man falls to the ground, and a red puddle begins forming around his head.
*page_break
*goto allen2
     *if (crowbar) #Attack the man with your crowbar.
      *set body_count +1
      You manage to grab your crowbar moments before the attacker reaches you. You duck as he throws a wild overhand fist and swing the crowbar at face.
The man releashes a deep growl and staggers for a moment before you strike his face again. You hear a cracking sound as he collapses on the sofa.
Just as he tries to stand you sit on his chest and begin smashing his face with the crowbar, over and over again. After a few strikes he stops moving
and you stand up, stained with blood and flesh.
*page_break
*goto allen2 
     #Wrestle the man with your bare hands.
      *set body_count +1
      *set health +1
      You dodge the man as he attempts hitting you with a wild overhand fist, and manage to grab his other hand. He releashes a deep growl as you
snap his wrist and launch a fist to his nose. He blocks your attempted knee and leans his weight against your body, resulting the both of you
crushing on the sofa, breaking it in half. You manage grab the man's neck as he attemptes headbutting (biting?) your face, and hit his forehead while 
using your remaining energy to snap his neck. The man stops moving and you stand up, bruised and bleeding lightly.
*page_break
*goto allen2
     #Flee.
      *set left_allen true
      Knowing you can't fight the man, you flee the apartment as quickly as you can.
*page_break
*goto ground_floor

If fire_axe is true, The only option is to attack with the fire axe. If it dosen’t, I get error messege:
Line 93: no selectable options. What’s wrong with the code?

Thanks!

Try changing the *if command for the baseball_bat to *elseif

*Elseif is the same as *if, except the game only checks it if the values above it are not true.

Did it. No change at all.

Is this the actual indentation? I could imagine the forum software messing up the indentation for the text, but even then the page_break and goto should be indented in the same way as the set function.

Try this:

in front of him. Before you can do anything the man turns around and starts moving directly towards you. You notice he looks very sick - pale skin,
red eyes, small pupils, heavy breathing, and a few bruises under the right eye. You take a slow, calm step back, and just as you're about to speak 
the man launches at you. You must act fast.
*choice
     *if (fire_axe) #Attack the man with your fire axe.
      *set body_count +1
      You manage to grab your fire axe moments before the attacker reaches you. You use the metal handle to deflect the wild overhand fist thrown at you and land a strike directly on the nose. The man staggers for a moment before you swing the axe at his head, hitting his right temple. He releases a deep growl and attempts to strike back just as you hit his forehead. You hear a sickening sound as the blade crackes the attacker's skull, spraying blood all over your shirt. A short moment passes before the man falls to the ground, and a red puddle begins forming around his head.
      *page_break
      *goto allen2
     *if (baseball_bat) #Attack the man with your baseball bat.
      *set body_count +1
      You manage to grab your baseball bat moments seconds before the attacker reaches you. You use the wooden handle to deflect the wild overhand fist thrown at you
      and land a quick strike to to jaw. The man staggers for a moment before you swing the bat directly at his face, crushing his nose. He releases a deep growl and attempts to strike back just as you hit his forehead. You hear a sickening sound as the bat crackes the attacker's skull, spraying blood all over your shirt. A short moment passes before the man falls to the ground, and a red puddle begins forming around his head.
      *page_break
      *goto allen2
     *if (crowbar) #Attack the man with your crowbar.
      *set body_count +1
      You manage to grab your crowbar moments before the attacker reaches you. You duck as he throws a wild overhand fist and swing the crowbar at face.
      The man releashes a deep growl and staggers for a moment before you strike his face again. You hear a cracking sound as he collapses on the sofa.
      Just as he tries to stand you sit on his chest and begin smashing his face with the crowbar, over and over again. After a few strikes he stops moving
      and you stand up, stained with blood and flesh.
      *page_break
      *goto allen2 
     #Wrestle the man with your bare hands.
      *set body_count +1
      *set health +1
      You dodge the man as he attempts hitting you with a wild overhand fist, and manage to grab his other hand. He releashes a deep growl as you snap his wrist and launch a fist to his nose. He blocks your attempted knee and leans his weight against your body, resulting the both of you crushing on the sofa, breaking it in half. You manage grab the man's neck as he attemptes headbutting (biting?) your face, and hit his forehead while 
      using your remaining energy to snap his neck. The man stops moving and you stand up, bruised and bleeding lightly.
      *page_break
      *goto allen2
     #Flee.
      *set left_allen true
      Knowing you can't fight the man, you flee the apartment as quickly as you can.
      *page_break
      *goto ground_floor

Tested it, I have “Wrestle the man with your bare hands” and “Flee” available, with all other boolean variables set to “false”.

And all of them available with them set to “true”.

3 Likes

It worked! thanks alot

1 Like

You’re welcome, the issue was mainly the indentation of the text after an “if” option. :wink:

2 Likes