• 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

adding an AC bonus to a material

Kaleb

Well-known member
if I wanted to add a +5 ac bonus to the adamantine material would this be the correct eval script

~ If we're equipped, add an armor bonus
if (field[gIsEquip].value <> 0) then
hero.child[ArmorClass].field[tAC].field[Bonus].value + 5
Endif

I am getting this error
Hero Lab was forced to stop compilation after the following errors were detected:

Syntax error in 'eval' script for Thing 'mWATAdamup' (Eval Script '#2') on line 3
-> Invalid use of a reserved word in script
 
Right, the error you're getting is because you're not putting an = on the line where you add 5. It should be "+=" instead of just "+". But more than that, you're pointing the script at the wrong place. Instead of going to the ArmorClass helper on the hero, try manipulating the armor that the material is inside.
 
Back
Top