Problem with using Variable Stat Titles

In an *if statement you can only give ChoiceScript two things to worry about at a time – any more and it crashes. The code in your initial example is giving them three, e.g.

*if (charisma >= endurance) and (charisma >= intellect) and (charisma >= strength)

To fix it, just take two of those things,

(charisma >= endurance) and (charisma >= intellect)

turn them into a single thing by adding another set of parentheses around them,

((charisma >= endurance) and (charisma >= intellect))

and then add the “third thing” back in at the end:

*if ((charisma >= endurance) and (charisma >= intellect)) and (charisma >= strength)

CS should parse that just fine, and the same process works for as many additional terms as you want to add (though if you add too many, it’ll be tricky to make sure you’ve used the right number of parentheses). Have a look at this thread for more examples:

1 Like