Expected closing parenthesis, was OPERATOR


#1

pls halp

I’ve been outa the game for like a year and a half so I’m rusty again. Can’t for the life of me figure out why I am getting this error for line 68 when the code works for line 67.


#2

When you have complicated things like this, try breaking them down into one-line-at-a-time things to find the error. When you do, you can re-complicate it.


#3

That’s giving me a migraine just looking at it!


#4

I’m working on creating temp variables for the addition. If I do it right, the ‘attack_full’ script will look exactly like the base_attack_bonus_full script. We shall see.


#5

I’m not sure the best way to describe it, but right now the “center” (deepest part?) of your stack of nested parentheses reads:

(base_attack_bonus) + (ability_str_modifier)&"/"

But that uses three parameters and ChoiceScript can’t handle more than two at a time. Try replacing that section with the following:

(base_attack_bonus + ability_str_modifier) &"/"

That way, the two parameters being added together are handled at once, together. Then the concatenation is handled against the result of the addition, rather than against the parameters being used during the addition.


#6

Well it isn’t the parameters that is causing the issue. I originally had it scripted that way, but changed it hoping to fix the error. No luck. I really just don’t understand why line 67 works with the &"/" but not line 68.


#7

Okay I fixed it the way I said I was. Added in 4 temp variables and rewrote the script to be like the base_attack_bonus_full script. Still not sure why it was giving me the error.

Hopefully someone can give some insight.