Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Frodie
Senior Member
 
Join Date: May 2007
Location: Durham, NC
Posts: 1,747

Old September 10th, 2013, 10:30 AM
I am trying to get a tracker to show the total amount in a chosen skill. But it only seems to show the ranks. Any ideas

Final 10000

if (field[usrChosen1].ischosen <> 0) then
field[usrChosen1].chosen.field[skTotal].value += field[trkMax].value
endif
Frodie is offline   #1 Reply With Quote
RavenX
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633

Old September 10th, 2013, 10:38 AM
Frodie,

If you want the tracker to show the total amount, you need to alter what you've done slightly to:

Code:
field[trkMax].value += field[usrChosen1].chosen.field[skTotal].value
The way you've set up your code you're telling Hero Lab to add the tracker to the skill total, not set the tracker equal to it. The line of code I've provided you, says to Hero Lab, set the tracker value equal to the skill total field.

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   #2 Reply With Quote
Frodie
Senior Member
 
Join Date: May 2007
Location: Durham, NC
Posts: 1,747

Old September 10th, 2013, 11:24 AM
Very cool, thank you!!!
Frodie is offline   #3 Reply With Quote
RavenX
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633

Old September 10th, 2013, 11:36 AM
No problem. Just bear in mind that coding isn't the same as algebra.
If you wish to set something equal to something else, you have to put the field you want to inherit the value on the left of your equal sign or incrementation functions (+=, -=, *=, /=). The object to be inherited should always be on the right hand side.

In our minds X = 8 is the same as 8 = X, but code compilers read things in the way they are programmed to. X = 8 would be saying set the variable X to be 8 in the compiler, but 8 = X would give errors because you're setting a constant equal to an unknown quantity in the compiler's programmed way of reading the data.

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


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 02:51 AM.


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