• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Nested If...Then...Else Syntax Error

DeathSheep

Well-known member
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.
 
Back
Top