Illegal to fall out of choice statement?

So i have this problem with the
“it is illegal to fall out of the *choice statement, you must *goto or *finish” error. The problem is, that even though i have *goto at the end of the choice, it still displays. (I have tested this with QuickTest so it may be a bug of it?)

  *if Gunshooting = 55
   *goto shuto
 #I try to reason with them..
  *if Focus = 60
   *goto rum
   *goto amnesia

Oh,also, the mesage says that the “I try to reason” choice is the error.

It can be a bit of a butt at times.
But I can spot several problems:

  • the #shoot option has nowhere to go if one does not have exactly 55 in gunshooting
  • the else might stumble over the flavor text. is this the only option that leads to the amnesia label?
1 Like

The #shoot will have an *else that leads to and amnesia label.
Wait, now it passed.

try replacing the ifs with

*if (gunshooting >=55)
*if (focus >=60)

respectively and see how it fares then.

If the error still pops up, try replacing the elses with

*if (gunshooting <55)
*if (focus <60)

That’s not a bug. The problem is that your *goto statement was walled off behind the *if statement. So when a value other than 55 came along, it couldn’t reach the *goto and simply fell through to the #choice beneath.

Okay so I know there is another topic with this name, but I don’t have much of a choice (I couldn’t possibly waste an opportunity for a good pun at a time like this).

… I’ve searched everywhere. Tried everything I could think of. As far as I know, my code is great.

But this error keeps popping up:

(“chapter2 line 137: It is illegal to fall out of a *choice statement; you must *goto or *finish before the end of the indented block.”)

I’ve taken out all the stuff I’ve written to make the little excerpt a lot shorter (easier to go through). If someone could take a look to see what I’m doing wrong, I would greatly appreciate it. Because I’m dyin’ over here :upside_down_face:

            *if Acrobatics > 4
               *if (peterscat=true)
                  MISSION SUCCESSFUL YAY
                  *goto thepath2
                  MISSION SUCCESSFUL YAY 2
                  *goto thepath2
            *if Acrobatics < 4
               *if (peterscat=true)
                  FAILED THINGY
                  *goto thepath2
                  FAILED THINGY 2

                  *goto thepath2
            *if (peterscat=true)
               *goto thepath2
               *goto thepath2
      *goto thepath2

*label thepath2

I’ve been stuck on this problem for about a week trying different things. The best I’ve done is just put another bug in its place because i was feeling frustrated and sassy. I’m sick of losing progress and losing motivation over it…

Just to make certain it isnt this:
Remove the free lines in the entire choicebody.

thanks for trying @MeltingPenguins but I still got the error… even after overdoing it and getting rid of all of the free lines in the entire document, it still pops up.
Mocking me. Goading me into smashing my laptop violently against the very internet itself. It knows no such thing as mercy. It is relentless in its determination to infuriate me beyond all meaning.

Try replacing the else with

*if (thing false)


*if (thing)
   Thing true
   *goto here
*if (thing false)
   Thing false
   *goto here

It’s possible that the error is not on the line that’s reporting a problem.

Looking at the option that reads #Absolutely!, I see the code can handle a player whose character has more than 4 acrobatics (see: *if Acrobatics > 4). And I see the code can handle a player whose character has less than 4 acrobatics (see: *if Acrobatics < 4). But the game cannot proceed if the player’s character has exactly 4 acrobatics. There’s simply no code for that possibility.

Try replacing *if Acrobatics < 4 with *else.

I’ll examine the rest of the sample in more detail now. Maybe there’s something important I’m overlooking.


Or turn one qualifier to either => (equal or higher) or =< (equal or lower)
Might be that its <=/>= im not certain

@Minnow i am not an emotional person but you make me want to cry with joy


thank you and thank you @MeltingPenguins as well

how did i never think of this…

thank you so much seriously :heart::sob::heart:

The pair is >= and <=.

I suggested *else not because it has any different effect, but simply because ChoiceScript isn’t as clever as an actual person, and I wanted to make sure the game knew, without a doubt, that all alternatives were accounted for. It 100% should work fine with <= or >=, but I’d want to test it before I trusted it, if that makes sense?




yeah, but i saw it that else seems to ignore a goto after a flavortext sometimes. You cant win with this thing at times shruggage

1 Like