I'm trying to add an ability that only works on an equipped shield.
So I am building a spell effect - and have "current armor" in my showmenu #1
The code I'm using is this:
However it bombs at the if (isShield = 0) - I'm not sure why - any ideas?
So I am building a spell effect - and have "current armor" in my showmenu #1
The code I'm using is this:
Code:
doneif (field[pIsOn].value = 0)
doneif (field[pChosen].ischosen = 0)
var isShield as number
isShield = 1
isShield = compare(field[pChosen].chosen.field[arCategory].text,"Shield")
if (isShield = 0) then
doneif (field[pChosen].chosen.field[gIsEquip] = 0)
if (hero.child[xSplRs].field[abValue].value = 0) then
#value[xSplRs] = 10
done
endif
if (hero.child[xSplRs].field[abValue].value > 0) then
if ((hero.child[xSplRs].field[abValue.value + 5) then
#value[xSplRs] = 10
done
endif
#value[xSplRs] += 5
endif
However it bombs at the if (isShield = 0) - I'm not sure why - any ideas?