Thread: Learning LUA
View Single Post
02-28-06, 07:04 PM   #5
Mr_Vonhelding
A Deviate Faerie Dragon
Join Date: Feb 2006
Posts: 10
Well its not working

heres what I have so far

myaddon.toc
## Interface: 1800
## Title: My Addon
## Notes: Testing Slash Commands
myaddon.xml

myaddon.xml
<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();
SLASH_MYADDON1 = "/myaddonmessage";
SLASH_MYADDON2 = "/mam";
SlashCmdList["MYADDON"] = myaddon_message();
</OnLoad>
</Scripts>
</Frame>

</Ui>

myaddon.lua
function myaddon_OnLoad()
message("My Addon Loaded!");
end

function myaddon_message()
message("Yay! It Works!");
end

And problem is when i type /myaddonmessage or /mam I get the type /help for a list of commands message
So its not loading or creating my slash command list.

What I see is
My Addon Loaded!
Yay! It Works!

as soon as I log in. so its like both events are firing and the list isnt being generated.

Can someone advise?
Please?
  Reply With Quote