thanks for the reply dude.
I'm not at home atm so I can't check but at first glance looks like the lowercase "k" may be a culprit. I'll check and let you know when I am at my WOW client.
The syntax on the macro name is for sure good, that's the first thing I checked and I triple checked. The reason I'm using XML is because the dude in my stupid WOW addon book suggested it, although I thought it odd that most of the current addons I looked at omitted the addon.xml file completely.
The weird thing and what spurred me to post here to ask is the fact that
Code:
action = GetBindingByKey("k")
print(action)
spit out 2 different responses. When I included it in the OnLoad function the output for the variable action from the WOW client on my chat was "MACRO Assist Leader" as soon as I loaded
5 seconds later when I copy and pasted the exact same syntax manually with /run variable action printed nil.
In both instances it was a lowercase k since I copy and pasted to make sure the syntax was identical. I did find screwing around that the binding names are all in capitals when output from the client so there might be something to the capitalization. Maybe the game does think it successfully binds to the "k" but in fact needs a capital "K." Like I said I'll check and get back to you.
If I can do the entire thing in Lua then that works for me too. One thing that was good about using xml is that the book I am using showed how to bind the keys and get them to show up in the default WOW keybindings menu. Is there a way to do that with lua as well?
Your advice on using local for everything is noted. As I noted in the other thread, it's monkey see monkey do at this point as I'm learning. The examples I saw didn't specify "local action" and "local success" so monkey didn't type that. Semantically, "local" means only applying to that particular addon right? You're right that there's nothing in my addon that needs to be global in that case.