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

Old June 19th, 2022, 06:33 PM
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)

      if (tagis[AdvanceCat.Advancement] <> 0) then

          var advcount as number
          var advcur as number
          var i as number

          advcur = field[advOrder].value
 
            i = 1
            foreach pick in hero from Advance where "AdvanceCat.Advancement"
              while (i <= field[advOrder].value)
                if (eachpick.field[advCost].value = 4) then
                  advcount += 1
                  endif
                i += 1
                loop
              nexteach

            field[advCount].value = advcount 
            advcount /= 4
            advcount = round(advcount,0,1)

          endif

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   #3 Reply With Quote