Iterative script issue
I am trying to make a script that adds one to the count for an advance only if the advance has a cost of 4 xp. I'd like for the iteration to ignore advances in the count if it has a cost other than 4xp. Ultimately, once the code is counting correctly I will divide it by 4 and round up so the advance applies to the level it was attained at.
Here is the code I came up with. For some reason it's still counting the advances that cost less than 4 xp and I want it to not do that. How could I fix the code? Ideas? Code:
doneif (field[advCost].value <> 4) |
1 Attachment(s)
Attached you will see the error issue, it's counting an iteration when the tag I am looking for is not present. In the source code its looking for a fieldval equal to 4 for a specific field but I tried it with a tag and it still gives me the error. How can I get it to not count those when running the iterative script?
|
I just tried doing it like this thinking it would go through each of the items in advances and pick off a count for only certain ones but it seems to not work like I intended.
Code:
doneif (field[advCost].value <> 4) |
What is this part of the script supposed to be doing?
Code:
advcur = field[advOrder].value |
Quote:
If the pick has an advOrder field of 3, it should count picks from 1 to 3 and increment only if the pick has an xp value of 4 xp. |
I think I found a work around for it.
Code:
<!-- If we're a character advancement, lock us into the first available slot on the advances array --> |
All times are GMT -8. The time now is 02:26 PM. |
Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.