Member
Join Date: Jun 2018
Posts: 83
|
I'm trying to adjust the list name of a power based on the character's level. Whenever I try to test the script, I get an error "Expected '(' following 'if' or 'while' statement. I don't see any syntax errors in the code, so I'm hoping someone else's eyes can catch what I'm not seeing.
Code:
if (field[xAllLev].value >= 17) then field[listname].text = field[thingname].text & " (d12)" elseif field[xAllLev].value >= 13) then field[listname].text = field[thingname].text & " (d10)" elseif (field[xAllLev].value >= 9) then field[listname].text = field[thingname].text & " (d8)" elseif (field[xAllLev].value >= 5) then field[listname].text = field[thingname].text & " (d6)" else field[listname].text = field[thingname].text & " (d4)" endif |
#1 |
Senior Member
Join Date: Sep 2017
Posts: 600
|
You're missing a "(" after the first elseif.
Found an issue with or have a suggestion for the 5e Community Pack? Please post it here at our GitHub. Feel free to stop by the Lone Wolf Development Subreddit, for discussion of any and all LWD products and community efforts! |
#2 |
Member
Join Date: Jun 2018
Posts: 83
|
Thanks. I hate stupid mistakes like that
|
#3 |
|
|