TCArknight
Well-known member
I'm back again with something that doesn't seem to be working...
I have a Skill component, and this eval script on the component:
That results in:
If i try using the amendthing statement instead, I get this:
I created the appenddesc macro based on the posts elsewhere -
If I try using:
it results in
I'm at a loss with this, because it seems like the trustme should at least allow me to modify the descript field directly.
Am I missing something?

I have a Skill component, and this eval script on the component:
Code:
<!-- Update description for each rank3+ with additional info -->
<eval index="5" phase="Traits" priority="10000"><![CDATA[
trustme
var myDesc as string
~if this skill is not added directly to the hero (i.e. an advance), skip it entirely
doneif (field[trtFinal].value <= 2)
if (field[trtFinal].value >= 3) then
myDesc = field[descript].text
myDesc &= "{br}{br}{b}Bonus: {/b}Reroll any single die when you take a Risk with this skill.{br}"
field[descript].text = myDesc
~perform amendthing[descript,myDesc]
endif
]]></eval>
Hero Lab was forced to stop compilation after the following errors were detected:
Syntax error in 'eval' script for Component 'Skill' (Eval Script '#5') on line 11
-> Only derived fields can generally be modified via scripts (field 'descript')
If i try using the amendthing statement instead, I get this:
Hero Lab was forced to stop compilation after the following errors were detected:
Syntax error in 'eval' script for Component 'Skill' (Eval Script '#5') on line 12
-> Script reference is invalid under the circumstances
I created the appenddesc macro based on the posts elsewhere -
Code:
<scriptmacro
name="appenddesc"
param1="thing"
param2="append"
result="perform state.thing[#thing].amendthing[description,#append & "{br}{br}" & state.thing[#thing].field[descript].text]"/>
If I try using:
Code:
#appenddesc[this,myDesc]
Code:
Hero Lab was forced to stop compilation after the following errors were detected:
Syntax error in 'eval' script for Component 'Skill' (Eval Script '#5') on line 13
-> Non-existent thing 'this' used by script
I'm at a loss with this, because it seems like the trustme should at least allow me to modify the descript field directly.
Am I missing something?