What is this part of the script supposed to be doing?
Code:
advcur = field[advOrder].value
for i = 1 to advcur
if (field[advCost].value = 4) then
advcount += 1
endif
next
It is checking the same field on the same pick over and over again, so advCount will either be 0 (if field[advCost] isn't 4) or advcur (if field[advCost] is 4)?