Couldn't parse the line after *selectable_if: jab


#1

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


#2

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


#3

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


#4

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


#5

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)


#6

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.


#7

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


#8

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


#9

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

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

etc.


#10

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).


#11

@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.)


#12

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.