• 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

More scripting frustration

Unseelie

Well-known member
I am getting the following error with the files I am currently working with and I can't figure out what's wrong with the script.

Hero Lab was forced to stop compilation after the following errors were detected:

Syntax error in 'eval' script for Thing 'raKPInfDer' (Eval Script '#1') on line 6
-> Error in right-side expression of assignment

Code:
  <thing id="raKPInfDer" name="Infiltrator" description="The derro gains a +2 racial bonus on Disguise checks to pose as a diseased dwarf, gnome, or human child and, when doing so, ignores the check penalties for disguising oneself as a different race and age category.  This racial trait replaces the ghost sound spell-like ability." compset="AltRaceTrt" uniqueness="unique">
    <comment>TO DO:
Not implemented yet</comment>
    <usesource source="bKPAdvRace"/>
    <tag group="RaReplace" tag="raKPDeGhSn"/>
    <tag group="AllowRCust" tag="rKPLDerARC"/>
    <tag group="Helper" tag="NoPathSoc"/>
    <tag group="SpecType" tag="Skill"/>
    <bootstrap thing="raDisguise">
      <autotag group="Value" tag="2"/>
      </bootstrap>
    <eval phase="PreLevel" priority="10000" index="2">~ Our value defaults to +2
      field[abValue].value += 2</eval>
    <eval phase="Render" priority="1000">~ If we&apos;re disabled, do nothing
doneif (tagis[Helper.SpcDisable] <> 0)

var Text as string
~ Build Text String once
Text = signed(field[abValue].value) & “ bonus on Disguise checks to pose as a diseased dwarf, gnome, or human child. Ignore check penalty to disguise self as different race or age, when doing so.”

~ Set situational text onto Disguise.
#situational[hero.childfound[skDisguise],Text,field[thingname].text]</eval>
    </thing>
 
I'm suspicious of the directional quotation marks on that line - see if using " works. Or maybe just convert the directional quotation marks to a normal ".

Either that or convert the whole eval script to a <![CDATA[ ]]> block, and go back to using normal &, <, >, etc. signs, instead of the weird versions you have to use if it's not set as <![CDATA[
 
This is the line it don't like:
Code:
Text = signed(field[abValue].value) & “ bonus on Disguise checks to pose as a diseased dwarf, gnome, or human child. Ignore check penalty to disguise self as different race or age, when doing so.”

Those quotes to me look like something that was pasted in from a word document. They don't look like standard quotes.

try this instead pasting in from the editor not into the XML:
Code:
Text = signed(field[abValue].value) & " bonus on Disguise checks to pose as a diseased dwarf, gnome, or human child. Ignore check penalty to disguise self as different race or age, when doing so."

You can also just shorten the code by doing this:
Code:
~ If we're disabled, do nothing
doneif (tagis[Helper.SpcDisable] = 1)

~ Set situational text onto Disguise.
#situational[hero.childfound[skDisguise], signed(field[abValue].value) & " bonus on Disguise checks to pose as a diseased dwarf, gnome, or human child. Ignore check penalty to disguise self as different race or age, when doing so." ,field[thingname].text]
 
I hadn't considered that the text got polluted with a copy paste... I'll tweak the quoting. Thanks for the other advice as well. I'll give it a try.
 
Last edited:
Back
Top