View Single Post
DeathSheep
Member
 
Join Date: Jun 2018
Posts: 83

Old November 5th, 2021, 08:58 AM
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
The error is reported on line 2.
DeathSheep is offline   #1 Reply With Quote