• 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

Why is this not working?

Illyahr

Well-known member
So I'm setting up a feat that gets harder to take as you get more of them but having trouble with the scripting

Code:
var void as number
var tao as number
void = hero.childfound[xVoid].field[hTotal].value
tao = hero.tagcount[User.Tao] * 3
tao = tao + 5

if (void >= tao) then
  @valid=1
endif

I have the feat apply the [User.Tao] tag at First/1000.
Each additional taking of the feat requires your max void points to be 3 higher. Any advice is appreciated
 
I would need more information to debug this. What about it isn't working? Also, why are you adding 5 to the tao variable?
 
Last edited:
Prereq is max void 5 plus 3 times number of times the feat has been taken so max void must be 5 or better to take it, 8+ for the second one, etc
 
Add debug statements to test to see if the script is doing what you expect it to be doing:
Code:
var void as number
var tao as number
void = hero.childfound[xVoid].field[hTotal].value
debug "void " & void
tao = hero.tagcount[User.Tao] * 3
debug "tao tagcount " & tao
tao = tao + 5
debug "tao +5 " & tao

if (void >= tao) then
debug "Valid TRUE"
  @valid=1
endif
Then go to "Develop->Floating Info Windows->Show Debug Output". Then try and add the feat to a character and the debug output will get displayed.
 
Back
Top