Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Authoring Kit

Notices

Reply
 
Thread Tools Display Modes
Duggan
Senior Member
Volunteer Data File Contributor
 
Join Date: Nov 2009
Posts: 1,502

Old August 31st, 2017, 07:56 PM
This is the code I'm using:
Quote:
<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

Quote:
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.
Duggan is offline   #1 Reply With Quote
Farling
Senior Member
 
Join Date: Mar 2013
Location: Greater London, UK
Posts: 2,623

Old August 31st, 2017, 11:29 PM
Perhaps adding the word "then" to the end of line 19 might help?

Farling

Author of the Realm Works Import tool, Realm Works Output tool and Realm Works to Foundry module

Donations gratefully received via Patreon, Ko-Fi or Paypal
Farling is online now   #2 Reply With Quote
Duggan
Senior Member
Volunteer Data File Contributor
 
Join Date: Nov 2009
Posts: 1,502

Old September 1st, 2017, 02:23 AM
Quote:
Originally Posted by Farling View Post
Perhaps adding the word "then" to the end of line 19 might help?
That did it. Thank you. My C roots are showing.
Duggan is offline   #3 Reply With Quote
RavenX
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633

Old September 1st, 2017, 06:24 AM
Quote:
Originally Posted by Duggan View Post
That did it. Thank you. My C roots are showing.
Keep this one in mind, Duggan. Its happened to me enough that its one of the first things I look for now.

RavenX Pronouns: She/Her

Please do not PM me to inquire about datafiles I coded "for personal use" such as Exalted, World of Darkness, AD&D, or Warhammer 40K Roleplaying. I appreciate your interest, but I do not own the Intellectual Property rights to these game systems. Nor do I have permission from any of the Publishers to distribute the data files. As such, I cannot distribute the work I have done with community on these files. They are "for personal use" only. Thank you.

I am far too busy these days to answer emails. If you message me here there is no guarantee I will get back to you at all.
RavenX is offline   #4 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 09:53 AM.


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