Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - User Projects

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
RavenX
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,621

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

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

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

          advcur = field[advOrder].value
          for i = 1 to advcur
            if (field[advCost].value = 4) then
              advcount += 1 
              endif
            next

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

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 08:56 AM.


Powered by vBulletin® - Copyright ©2000 - 2022, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.