I'm attempting to add keybindings to an addon but I can't quite figure it out. I'm trying to get help from
http://www.wowwiki.com/Using_binding...for_your_addon but it isn't helping.
What I have so far is a file called "bindings.xml" that has:
Code:
<Bindings>
<Binding name="CASHCOUNTER_SHOWHIDE" header="CASHCOUNTER_TITLE">
if (CC_Title:isShown()) then
CC_Toggle('hide');
else
CC_Toggle('show');
end
</Binding>
<Binding name="CASHCOUNTER_LOCKUNLOCK">
CC_Vars.locked = not CC_Vars.locked;
if (CC_Vars.locked == true) then
CC_Message(CASHCOUNTER_LOCKED);
else
CC_Message(CASHCOUNTER_UNLOCKED);
end
</Binding>
</Bindings>
But I get an error:
Code:
Message: [string "CASHCOUNTER_SHOWHIDE"]:1: function arguments expected near ')'
Time: 09/07/11 22:53:08
Count: 1
Stack:
Locals:
Can anyone help?
EDIT: I previously had CC_Title:isShown, so that got rid of the error. Although in the keybindings it still shows:
CASHCOUNTER_SHOWHIDE [not bound] [not bound]
CASHCOUNTER_LOCKUNLOCK [not bound] [not bound]
With a space above where the header should be.
Does it need to know of my enUS.lua?
Do I need to include bindings.xml in the .toc for my addon?
EDIT: With some good old "let's see if this works" I figured it out.