Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - D&D 5th Edition SRD

Notices

Reply
 
Thread Tools Display Modes
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
Fenris447
Senior Member
 
Join Date: Sep 2017
Posts: 510

Old November 5th, 2021, 01:28 PM
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!
Fenris447 is offline   #2 Reply With Quote
DeathSheep
Member
 
Join Date: Jun 2018
Posts: 83

Old November 5th, 2021, 03:52 PM
Thanks. I hate stupid mistakes like that
DeathSheep is offline   #3 Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 08:20 PM.


Powered by vBulletin® - Copyright ©2000 - 2022, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.