View Single Post
SAbel
Senior Member
 
Join Date: Jul 2007
Location: Walbridge, Ohio
Posts: 767

Old July 14th, 2009, 10:24 PM
Ouch I get an error

The data files could not be loaded due to the following errors:

Syntax error in 'eval' script for Component 'Skill' (Eval Script '#2') on line 15
-> One or more 'if' statements is missing the closing 'endif' statement
One or more timing errors were identified. Please review the timing report and correct the errors. You can access the report under the 'Develop' menu or by clicking this link.

I placed it as follows

<eval index="2" phase="Traits" priority="10000">
<before name="Calc resLeft"/>
<after name="Bound trtUser"/><![CDATA[
~if this skill is not added directly to the hero (i.e. an advance), skip it entirely
if (origin.ishero = 0) then
var traitlevel as number
var traitcost as number
var finalvalue as number

traitlevel = field[trtUser].value
traitcost = 1

finalvalue = traitcost / 2 * (traitlevel * traitlevel + traitlevel)

hero.child[resCP].field[resSpent].value += finalvalue

]]></eval>
SAbel is offline   #20 Reply With Quote