Get spell name from a button name
Hello,
I'm looking to setup a script at load time to do the following: Code:
local button = _G["BT4Button73"] |
Quote:
Can't simply run a /use or /cast as a script from addons. |
Quote:
Code:
function ParseSpellName(spellId) |
You're addon is probably running the code before Bartender has initialised the bars. This usually happens at a specific event that fires during the game loading sequence.
It's also why it works when you're already in the game tesing in WowLua. Try something like: Lua Code:
|
That's perfect! Thank you! Everything works as expected after deferring it PLAYER_ENTERING_WORLD.
|
All times are GMT -6. The time now is 10:06 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI