Selectable_if not working past certain point


#1

I’m having trouble with…

The error I’m getting is:… chptraining2 line 160: Non-existent command 'selectable_if

My code looks like this:

*choice
  *selectable_if (chap > 3) #Travel
    *gosub fakephone
  #Use your Phone
    *gosub fakephone
  *selectable_if (chap > 3) #Sleep
    *gosub fakephone

Been working the whole time but always have hit this snag precisely at this part…

I have adjusted indent
spaces brackets braces and went through


#2

What is that apostrophe before selectable?

Is that just quicktest quoting the command (and you left out the closed quotation mark here) or is that a stray bit of punctuation in your code?


#3

You need a *goto after (or instead) of a *gosub, or to use the *fake_choice command instead of *choice. The gosub is returning you to the same place and you’re then falling into the next choice, which I think is why it’s complaining about the selectable_if.


#4

That’s definitely a good point. Are these the only choices in this choice tree, or have you just given us a few of them? Because if these are the only ones, then @Scribblesome’s got at least one thing wrong here.


#5

@Scribblesome is right. After the first two *gosub’s, add in a *goto to bypass the last *selectable_if, which is being read without the preceding choice and causing the error.