Thread Tools Display Modes
Prev Previous Post   Next Post Next
09-06-08, 07:22 AM   #1
TreeBee
A Murloc Raider
Join Date: Sep 2008
Posts: 7
Slashcommandhandler

Hi,

my code doesn't seem to work:

function MaggyAssigner_SlashHandler(msg)
local Cmd = MaggyAssigner_GetCmd(msg);
if (Cmd == "help") then
MaggyAssigner_DisplayHelp();
elseif (Cmd == "show") then
MaggyAssigner_DisplayMe();
else
MaggyAssigner_DisplayHelp();
end
end

function MaggyAssigner_DisplayMe()
MaggyAssigner:Show();
end

function Maggy_DisplayHelp()
DEFAULT_CHAT_FRAME:AddMessage("HELP!");
end

function MaggyAssigner_OnLoad()
SlashCmdList["MaggyAssigner"] = MaggyAssigner_SlashHandler(msg);
SLASH_MaggyAssigner1 = "/show";
SLASH_MaggyAssigner2 = "/help";
end

The form's onload event: MaggyAssigner_OnLoad();


What am I doing wrong?

rg,
Eric
  Reply With Quote
 

WoWInterface » Developer Discussions » General Authoring Discussion » Slashcommandhandler


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