Quote:
Originally Posted by Provos
Ah the script is on the new material I am using and yes I am getting an error.
Syntax error in "eval" script for Thing 'mRedstl' (Eval Script '#2') on line 4 -> Non-existent filed 'chosen' by script
|
Ah, yes, that makes sense. You'll need to tell the script to look at the parent. Also, the error is because the original script you copied is for something that has a chooser.
Try the following and let me know what you get:
Code:
var crit as number
if (container.parent.tagcount[wCritMin.?] > 0) then
crit = container.parent.tagmin[wCritMin.?]
endif
~now, we'll subtract one from the value we looked up:
crit -= 1
~and create a tag for that new value:
var newcrittag as string
newcrittag = "wCritMin." & crit
~Weapons are assumed to have exactly one wCritMin tag,
~so we'll delete anything that already exists,
~and then assign the new tag:
perform container.parent.delete[wCritMin.?]
perform container.parent.assignstr[newcrittag]