• 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

"Invalid use of a reserved word" in a script

Duggan

Well-known member
This is the code I'm using:
<eval index="1" phase="PreTraits" priority="4900">
<before name="Calc trtFinal"/><![CDATA[
~build the candidate expression out of our Skill and Skills tags
var skills as string
skills = tagids[Skill.?, " | "]
var skilltypes as string
skilltypes = tagids[Skills.?, " | "]

var combined as string
if (tagis[Skills.?] <> 0) then
if (tagis[Skill.?] <> 0) then
combined = skills & " | " & skilltypes
else
combined = skills
endif
else
combined = skilltypes
endif

if (empty(combined) <> 0)
field[usrCandid1].text &= " & (" & combined & ")"
endif

perform field[usrChosen1].chosen.field[trtBG].modify[+,2,"Background"]
]]></eval>

It's giving me an error of

Syntax error in 'eval' script for Thing 'fRPlusSkMx' (Eval Script '#1') on line 19
-> Invalid use of a reserved word in script

I've tried replacing "empty" with a check for the length of the string, but to little avail. Are these not the correct keywords for that function? If I comment out the "if" statement and the "endif", it works. I suppose that, if all else fails, I can rig up if statements with invoking tagis again to only do that check if either tag is present, but I'd prefer to avoid that.
 
Back
Top