Falling out of a choice

In a nested choice in my first chapter of my game, I keep getting this error when I try to run it:
It is illegal to fall out of a choice. You must*go to or star finish before the end of the indented block.
What I’m confused about, is that start up line 32 is a choice. My code looks like this:

 #Send skeletons, skeletons are fast and light.
  You choose to send skeletons.
 #Send zombies. Zombies are slow but strong.
  You send zombies.
 #Send both.

Last time this thing came up, I was told to put text between the choices, which I have done.
Not sure why it is still coming up with this same thing.

You can use *fake_choice instead of *choice.

Alternatively, you can use *goto 's after the text of each option, with a *label after the choice block.

You can also turn on implicit control flow, which you can read more about here. It essentially does away with the “illegal to fall out of a choice” error and having to use *goto after every choice, which is a life-saver, but beware: it’s probably better to turn it on when you have a good handle of your branching!

Also, it would help if you could copy-paste your code as-is, indents and all, here for us to see for any future errors. You can do this by either clicking the </> symbol at the top of the text box, or by surrounding your code with this symbol: ```


I find the best thing to do is to carefully read the error message and take its recommendations:

“You must use *goto or *finish before the end of the indented block.

When I look at your indented blocks, I don’t see any *goto or *finish. That’s probably a good place to start! Make sure you understand what these commands mean and how to use them appropriately. Boot up the tutorials and reread them if you’re unsure.


I added the pre-formatted text code to your post. Please make sure to follow @rinari’s instructions when posting code so we can assist you to the best of our abilities! :blush:

This topic was automatically closed after 2 hours. New replies are no longer allowed.