• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

skTotal

Frodie

Well-known member
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,

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.
 
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.
 
Back
Top