GetVariable() Question

Posted by Strazor on Thu 04 Sep 2014 06:07 PM — 4 posts, 15,999 views.

USA #0
I have been able to successfully capture STAT MODS from the ID command in aardwolf.

STATS Captured are Strength, Wisdom, Intelligence, Dexterity, Luck, Constitution, Damage roll and Hit roll.

The following works perfectly

print(GetVariable ("Wisdom")) 


When I try to capture Damage roll I get a nil value. I believe this is because of the space in the name "Damage roll" from the trigger. Any suggestions on what I can use to pull "Damage roll"?


print(GetVariable ("Damage roll"))
Australia Forum Administrator #1
Yes, variables cannot have spaces in their names.

If this is under code control just call it DamageRoll.
Australia Forum Administrator #2
An alternative is to use Lua variables rather than MUSHclient ones. You could have a table of stats, eg.


stats = { }  // do this once only

stats ["Damage Roll"] = 42
USA #3
Very interesting. Thank you for the tip Nick.