I think I might have barked up th wrong tree, asking for advice.
The weapons in the system I'm coding are tied to skills, Pistols use the Pistol skill, Swords use the Melee skill, Poleaxe uses Great Weapon skill, etc.
I've linked the skills to the weapon thing, but the problem I'm running into is when someone buys a weapon for a skill they don't have. Then the system freaks out about the linked skill not existing. Here's the code it's choking on
Is there a way to do something similar to childfound with linked skills? In most languages, i'd use something like isNull, but I have no clue how to do this here. Do I need to re-write my weapons to maybe use tags for their related skill instead of a linked skill?
The weapons in the system I'm coding are tied to skills, Pistols use the Pistol skill, Swords use the Melee skill, Poleaxe uses Great Weapon skill, etc.
I've linked the skills to the weapon thing, but the problem I'm running into is when someone buys a weapon for a skill they don't have. Then the system freaks out about the linked skill not existing. Here's the code it's choking on
Code:
<!-- Calculate the net attack (MAT) value for the weapon -->
<eval index="2" phase="Final" priority="7000" name="Calc wpNetAtk"><![CDATA[
var skill as number
skill = linkage[skill].field[trtUser].value
field[wpNetAtk].value = skill + field[wpBonus].value + field[wpPenalty].value + #trait[attrPrw]
]]></eval>
Is there a way to do something similar to childfound with linked skills? In most languages, i'd use something like isNull, but I have no clue how to do this here. Do I need to re-write my weapons to maybe use tags for their related skill instead of a linked skill?