Hi
I am trying to retrieve the
cost from the function GetSpellPowerCost within Classic TBC, but it seems no matter how I run it, the result is
nil.
The following code returns
nil:
Lua Code:
spellInfo = GetSpellPowerCost(133)[cost]
print(spellInfo)
As does:
Lua Code:
spellInfo = GetSpellPowerCost(133)
print(spellInfo[cost])
And:
Lua Code:
spellInfo = GetSpellPowerCost(133)
spellCost = spellInfo[cost]
print(spellInfo)
Which are admittedly trying the same thing.
The only way I can get the info to show up is if I run the following in-game:
/dump GetSpellPowerCost(133)
But then that provides me with the whole table information, not the specific key/value set that I am looking for.
I am relatively new to Lua scripting, especially within WoW, so any guidance is appreciated. Thanks!
**EDIT** I am an idiot- it should be
Lua Code:
spellInfo = GetSpellPowerCost(133)[1].cost
print(spellInfo)