Problems with *fake_choice, *set and *selectable_if

Hi! A poor coder (and English speaker) here!

I’m having issues putting the *set and *selectable_if command after the *fake_choice. What is strange is that I put exactly the same way at the begining of the file and it works, now I thing it’s not reconizing the *fake_choice or something like that?..

The code:

> *fake_choice
>    #"Yes... He was at the stable, and I wanted to see him. He's my best friend mom!"
>     *set close %+5
>     *set charm %+5
>     text text text and more text

>    *hide_reuse *if (consohenry)   #"I was so nervous by today that I needed to spoke to him. Please don't tell dad!"
>     *set close %+5 ***(line 177)***
>     *set charm %+5
>     text text text and more text

>    *hide_reuse *if (brokhenry)   #"Mom... I went to see him, but it's not like was before. I guess dad is right."
>     *set disdain %+10
>     *set close %-10 
>     text text text and more text

When I let this way the error is line 177: Expected option starting with #, and when I put more spaces the errors is “expected x lines, was x lines”.

Oh, and I don’t think it’s going to show, but every “#” has 3 spaces and every *set has 4 spaces.

Any tips?

First: Use the </> button (or four extra spaces) to format text to preserve indentation on the forums.

Second: I’m pretty sure *if does not work with fake_choice. Just use a normal *choice.

Third: General tip: use more than 1 space for indentation, 'cause even if you can read it now, you won’t be able to in the future (and even if you can in the future, no one else will be able to).

That bit should look like this:

*fake_choice
  #Yes
    *set 
    *set
    text
  *if consohenry 1
    *hide_reuse
      #I was
        *set
        *set
        text
  *if brokhenry 1
    *hide_reuse
      #choice
        *set
        *set
        text

Please note that in this coding, 1 indicates ‘true’

Just wondering why are you using the *hide_reuse with the *fake_choice ? Do you plan on using that label more than once? I know *if and *selectable_if work within a *fake_choice.

1 Like

I’ve had this same problem in my project.

If you’re using an *if for one of your options, the option preceding it has to have a *goto at the end of it, even if it’s a *fake_choice. Or you’ll hit an error when you select the preceding choice.

@Reaperoa Thank you very much for the tips! I’ll try to use then in my next post! I tried to use the *choice but it doesn’t worked very well…

@Shawn_Patrick_Reed Thank you! It worked, but with the choice right after the *hide_reuse, with no lines/spaces.

@Silverstone Yes. The “consohenry” and “brokhenry” label it’s for the whole chapter, I put them in the beggining of the file following the instructions in the choicescript wiki. It’s a thing that if happened, will trigger different events in the same chapter.

@OdicHastings I used the *goto in all choices before that, as you said. It worked too. Thank you!

Again, thank you all for the help and patience.
:blush: