Couldn't parse the line after *selectable_if: jab

Error:
Couldn’t parse the line after *selectable_if: jab

Does anyone know whats wrong with this?

*choice
_*selectable_if jab
__*selectable_if dieroll > 10
___#Jab
____*set did “jab”
____*set dmg 5
____*goto feedback

Also, it’s properly indented. I don’t know why the indent isn’t showing

what kind of variable is “jab”?

true/false?

numeral?

text?

Also, I don’t think you should use ____ before your commands, replace those with blank spaces and it might work

And for some reason, even though I double checked in edit mode, it sayes “selectableif” in stead of “selectable_if”

Jab is a boolean. I should explain whats up. Okay, so right now I’m working on a book and in this part, the machine has to check if the player 1) knows the attack jab and 2) rolled higher than a 10 on a 100 sided die (This is how some attacks are avaliable and some aren’t)

Jab is true if the player knows the attack. The player only sees the option if they know the attack and it is avaliable. And I put the _s there to show indenting, since it appears that the question automatically trims whitespace. The _s are spaces in the real file.

Replacing *selectableif jab with *selectable_if (jab = true) might work. I’m not 100% sure tho.

The question displays selectableif even though I typed selectable_if. Oh well. And if jab or if (jab=true) actually mean the same thing. I still very much appreciate your time. Thanks

Looks like CS can’t handle a cascade of selectable_ifs. Try

*selectable_if ((jab) and (dieroll>10)) #Jab
__*set did “jab”

etc.

1 Like

As Havenstone says, *selectable_if can only be used inline.

Also you can use a backslash (\) before any asterisks * to stop forum post formatting issues (such as italicizing).

@Havenstone got it.

P.S.: the little button that looks like </> can be used to make spaces show up in code (highlight the code and click the button.)

Agree with @Havenstone and @Sashira. Also check indentations before the *selectable_if like im talking further up in your story, that also messes up my codes sometimes.