Thread Tools Display Modes
01-06-07, 02:27 AM   #1
mulesh
A Chromatic Dragonspawn
 
mulesh's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 193
LUA Trouble

Need a little help with some slash commands.

Everything functions as intended but I wanted to use some slash commands to toggle the mod on and off as well as set a user defined value to Warning_Interval (how do I tell if an interger has been entered?)

This is what I have so far:

function PetNotify_Onload()
SLASH_PETNOTIFY1 = "/petnotify";
SLASH_PETNOTIFY2 = "/pn";
SlashCmdList["PETNOTIFY"] = PetNotify_Command;
end

function PetNotify_Command(cmd)
if (cmd == "" or cmd == nil) then
DEFAULT_CHAT_FRAME:AddMessage(helptext);
end
if (cmd == "on") then
DEFAULT_CHAT_FRAME:AddMessage(toggleOntext);
enable = true;
end
if (cmd == "off") then
DEFAULT_CHAT_FRAME:AddMessage(toggleOfftext);
enable = false;
end
if (cmd == ??) then
DEFAULT_CHAT_FRAME:AddMessage(Delaytext);
Warning_Interval = ??;
end
end

Last edited by mulesh : 01-07-07 at 11:45 PM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » LUA Trouble


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