Senior Member
Join Date: May 2007
Location: Durham, NC
Posts: 1,747
|
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 |
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633
|
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 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. |
#2 |
Senior Member
Join Date: May 2007
Location: Durham, NC
Posts: 1,747
|
Very cool, thank you!!!
|
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633
|
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. |
#4 |
|
|