• 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

Error on Right Side

blzbob

Well-known member
I'm trying to get the hardness loss to be automatically calculated for this ability.

Deteriorate: The alchemist can weaken the durability of inanimate objects. On a successful hit, the object loses 1 hardness for every two levels of the alchemist. Attended and magical objects are allowed a Fortitude saving throw to negate this effect: DC 10 + one-half alchemist level + alchemist’s Intelligence modifier.

I tried this (I took it from Stunning Fist):

~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)

var levels as number
levels = #totallevelcount[] - #levelcount[Alchemist]

field[trkMax].value += #levelcount[Alchemist] levels/2,0,-1

I get the error:

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

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

Where did I go wrong?
 
#levelcount[Alchemist] levels/2,0,-1

does not make sense. I think what you want is to halve levels and then round down? That would be

round(levels/2,0,-1)
 
This is what I'm using:

~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)

var levels as number
levels = #totallevelcount[] - #levelcount[Alchemist]

field[trkMax].value += #levelcount[Alchemist] round(levels/2,0,-1)

This is the error I'm getting:

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

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

I've also tried (from the Bravery script):

field[listname].text = "Reduce Hardness by +" & field[xIndex].value

~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)

var calclevel as number
calclevel = #levelcount[Alchemist].value
field[abValue].value = round(calclevel/2, 0, -1)

And I'm getting the error:
Hero Lab was forced to stop compilation after the following errors were detected:

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

Even with the change, I can't get it to compile.
 
#levelcount[Alchemist].value

Should be just:

#levelcount[Alchemist]

Anything with a # in front of it is a macro, and doesn't need a .value or .text after it, that is handled within the processes of the macro. Try this:

Code:
~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)

var levels as number
levels = #totallevelcount[] - #levelcount[Alchemist]

field[trkMax].value += round(levels/2,0,-1)
 
Back
Top