View Single Post
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