I am trying to mage a class ability that calculates a spell pool for existing classes, then I am using a global mechanic that bootstraps the ability onto all classes. The problem is that I am getting an odd error.
Here is my code
I am getting an error "Attempt to access field 'cTotalLev' that does not exist for thing 'mMagPool' Location: 'field calculate' script for Field 'xTotalLev' near line 16
There are no scripts attached to mMagPool, so I am not sure why I am getting this error.
Here is my code
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<document signature="Hero Lab Data">
<thing id="cDivPool" name="Divine Casting Pool" description="This pool controls the amount of divine power you can use in a day." compset="ClSpecial" summary="You have a pool for casting divine spells.">
<tag group="User" tag="Tracker" name="Tracker" abbrev="Tracker"/>
<tag group="Usage" tag="Day"/>
<eval phase="Final" priority="10000"><![CDATA[
~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)
var i as number
i = 0
foreach pick in hero where "CasterSrc.Divine"
debug "name "&eachpick.field[name].text
debug "Caster Level "&eachpick.field[cCasterLev].value
i += eachpick.field[cCastMax].arrayvalue[1] + eachpick.field[cMemMax].arrayvalue[1]
i += 2 * (eachpick.field[cCastMax].arrayvalue[2] + eachpick.field[cMemMax].arrayvalue[2])
i += 3 * (eachpick.field[cCastMax].arrayvalue[3] + eachpick.field[cMemMax].arrayvalue[3])
i += 4 * (eachpick.field[cCastMax].arrayvalue[4] + eachpick.field[cMemMax].arrayvalue[4])
i += 5 * (eachpick.field[cCastMax].arrayvalue[5] + eachpick.field[cMemMax].arrayvalue[5])
i += 6 * (eachpick.field[cCastMax].arrayvalue[6] + eachpick.field[cMemMax].arrayvalue[6])
i += 7 * (eachpick.field[cCastMax].arrayvalue[7] + eachpick.field[cMemMax].arrayvalue[7])
i += 8 * (eachpick.field[cCastMax].arrayvalue[8] + eachpick.field[cMemMax].arrayvalue[8])
i += 9 * (eachpick.field[cCastMax].arrayvalue[9] + eachpick.field[cMemMax].arrayvalue[9])
debug "Divine Caster "&i
nexteach
debug "Divine Caster Total "&i]]></eval>
</thing>
<thing id="mMagPool" name="Magic Pools" compset="Mechanics" uniqueness="useronce">
<usesource source="srcShatt" parent="UserParent" name="Shattered Isles"/>
<bootstrap thing="cDivPool"></bootstrap>
</thing>
</document>
I am getting an error "Attempt to access field 'cTotalLev' that does not exist for thing 'mMagPool' Location: 'field calculate' script for Field 'xTotalLev' near line 16
There are no scripts attached to mMagPool, so I am not sure why I am getting this error.