Quote:
Originally Posted by Mathias
Separate lines - one after the other, with the endif that matches the first one after everything that should happen if that's true.
Also, think about the amount you're subtracting - do you have another value that will be the same as the amount you want to subtract, that you could use instead of having a separate if...endif for each possible number?
|
Code:
if (field[gUserEquip].value = 1) then
if (field[trkUser].value = 1) then
hero.child[ArmorClass].field[tACArmor].value -= 1
endif
endif
if (field[gUserEquip].value = 1) then
if (field[trkUser].value = 2) then
hero.child[ArmorClass].field[tACArmor].value -= 2
endif
endif
so this "masterpiece" of code does the trick. *fireworks and all* been banging me head over it for a few hours but i have the persistence feat
Now regarding what you said @mathias i think i understand what you mean, (as the number i subtract is the same value that i check in the trkUser field).
For now i have no clue (yet) how to do that though.