Invalid expression

Can someone tell me what the error here means? What am I doing wrong?
I’m trying to make it so the user will initially choose a stat they are very good at, then one they are moderately good at, then one they are bad at, and when the choice is made in the previous step that option goes away for the next choice so it isn’t repeated.

You were very…

*temp str_stat_chosen false
*temp int_stat_chosen false
*temp agi_stat_chosen false
*temp per_stat_chosen false
*temp cha_stat_chosen false
*fake_choice
    #Strong.
        *set str %+50
        *set str_stat_chosen true
    #Smart.
        *set int %+50
        *set int_stat_chosen true
    #Agile.
        *set agi %+50
        *set agi_stat_chosen true
    #Perceptive.
        *set per %+50
        *set per_stat_chosen true
    #Charismatic.
        *set cha %+50
        *set cha_stat_chosen true
        
But you were also…
*fake_choice
    *if (not (str_stat_chosen)) #Strong.
        *set str %-30
    *if (not (int_stat_chosen)) #Smart.
        *set int %-30
    *if (not (agi_stat_chosen)) #Agile.
        *set agi %-30
    *if (not (per_stat_chosen)) #Perceptive.
        *set per %+30
    *if (not (cha_stat_chosen))#Charismatic.
        *set cha %-30
But you were not very…
*fake_choice
    *if (not (str_stat_chosen)) #Strong.
        *set str %-10
    *if (not (int_stat_chosen)) #Smart.
        *set int %-10
    *if (not (agi_stat_chosen)) #Agile.
        *set agi %-10
    *if (not (per_stat_chosen)) #Perceptive.
        *set per %-10
    *if (not (cha_stat_chosen))#Charismatic.
        *set cha %-10

I’m getting the invalid expression, couldn’t extract another token error for the *if (not (cha_stat_chosen))#Charismatic line but not the others and I don’t know why. And when I try to use an else statement, then the choice for charisma doesn’t show up.

You’re missing a space between charisma condition and hash symbol in both fake choices.

Thanks, that fixed it.

1 Like

This is unrelated to your question, but in the second *fake_choice, only #Perceptive will increase its corresponding stat by %+30, as the other four are all set to %-30.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.