View Single Post
RavenX
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633

Old June 21st, 2022, 08:11 PM
Quote:
Originally Posted by ploturo View Post
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)?
For each of the picks, I wanted it to cycle through the previous picks and determine if the cost field or tag was present, then increment the field. If the advancement costs 4 xp, increment the field. The idea was for the script to cycle through all the picks and increment only for the ones that meet the 4 xp requirement.

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.

RavenX Pronouns: She/Her

Please do not PM me to inquire about datafiles I coded "for personal use" such as Exalted, World of Darkness, AD&D, or Warhammer 40K Roleplaying. I appreciate your interest, but I do not own the Intellectual Property rights to these game systems. Nor do I have permission from any of the Publishers to distribute the data files. As such, I cannot distribute the work I have done with community on these files. They are "for personal use" only. Thank you.

I am far too busy these days to answer emails. If you message me here there is no guarantee I will get back to you at all.
RavenX is offline   #5 Reply With Quote