It is illegal to fall out of a *choice statement; you must *goto or *finish before the end of the indented block

Well Choice Forum, I have another problem that I can’t seem to monkey-mode my way out of.

I’m trying to make a list of questions that the reader will be able to ask a character- get an answer, and then be able to ask another question on the list.

Then when they ask all the questions they wanted to ask, they can continue on with the main story. Sadly, when I get to just the first example question- and the secondary question within it, I’m told the error below:

Error: Resolve line 344: It is illegal to fall out of a *choice statement; you must *goto or *finish before the end of the indented block.

My code looks like this:

P.S I did a lot of editing to take out spoilers for the story itself, so if it looks like a toddler wrote the plot- sorry.

*label Questions
What Question do you want an answer too?
*choice
  #Ophelia City?
    “So how was Ophelia? With your aunt?"
    "Not good"
    *choice
      #I'm sorry to hear that.
          “Oh, it’s nothing to feel sorry over. It’s the way things are sometimes, right?” 
          “Ok, I guess…”
          *goto Questions

      #Maybe if you’d [i]called.[/i]
          "Well, Maybe if you’d [i]called[/i] I could have helped."

          "Maybe, but you know I wouldn’t have accepted.” His tone got almost as harsh as yours.
          *goto Questions
  #Social Life?
    “Did you make a lot of friends in Ophelia? I’ve heard it’s a very social city- everyone knows everyone.”
    "Not really"
    *goto Questions
  #You have to get to work now. (Note: You will not get to ask these questions later.)
    *goto Goodbyes

*label Goodbyes
Bla bla bla - not written yet.

Any help would be greatly appreciated as most of choicescript I’m learning by myself and keep running into problems that I don’t really have anyone but the people on this forum to help me with.

does that line have a *goto or *finish?
I assume it must be the *goto Goodbyes line, in which the non written part that follows doesn’t have a *goto or *finish.

You should plug all your ends with *finish to test the game, otherwise it would reach the ends with no commands and it’ll give you that error.

1 Like

I think it would be better to use fake_choice instead for this scenario. I think *choice always requires a *goto to work, so the Ophelia city? choice might be causing the problem.

2 Likes

I don’t think that’s the problem he is showing, but what you say also could make another problem that is a loophole, I think that the test was updated some time back, and it has a way to see that issue and point it out as an error.

In that example there’s nothing that stops you from choosing the same 2 options over and over again indefinitely. But that I think does not gives that error, so he’ll encounter that error once he fix the one that the test is showing him now. Which could be solved adding a variable to the choice so it can be used only once, or use *hide_reuse or *disable_reuse.

2 Likes

That was it! Thank you for the help on both comments! :smile:

1 Like

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