Thread Tools Display Modes
Prev Previous Post   Next Post Next
10-19-13, 04:27 PM   #1
Bloodier
A Fallenroot Satyr
Join Date: Mar 2012
Posts: 20
Help with Slash Command implementation

I'm creating a simple addon that shows information like XP to level up on the chat. It's called by typing /minXP. I have the following code (using an .xml to be able to use OnLoad), but the game keeps throwing an unknown command error each time I call it.

Code:
local function cmdHandler(msg, editbox) 
	showXP();
end

function MinimalXP_OnLoad()
	SLASH_MINXP1= "/minXP";
	SlashCmdList["minimalXP"] = cmdHandler;	
end

Last edited by Bloodier : 10-19-13 at 04:35 PM.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Help with Slash Command implementation


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off