Thread: Learning LUA
View Single Post
03-01-06, 07:48 AM   #6
JoshBorke
A Chromatic Dragonspawn
 
JoshBorke's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 185
Code:
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ C:\Projects\WoW\Bin\Interface\FrameXML\UI.xsd">
<!-- Load Script file -->
<Script file="myaddon.lua"/>
<Frame name="myaddon">
<Scripts>
<OnLoad>
myaddon_OnLoad();
</OnLoad>
</Scripts>
</Frame>

</Ui>
myaddon.lua
Code:
function myaddon_OnLoad()
SLASH_MYADDON1 = "/myaddonmessage";
SLASH_MYADDON2 = "/mam";
SlashCmdList["MYADDON"] = myaddon_message;
message("My Addon Loaded!");
end

function myaddon_message()
message("Yay! It Works!");
end
try that
  Reply With Quote