Thread Tools Display Modes
05-04-09, 06:37 PM   #1
Renee
A Defias Bandit
Join Date: May 2009
Posts: 3
Question Just where did it go wrong?

I am currently trying to make an all-purpose addon, building it from scratch with slash-commands on event-handler first, to make sure they work ( last time they didn't ).
However, after having tried time and again, and using another five addons to try and help me with this, my event(s) are still sadly not working.
Could anyone tell me just what went wrong?

XML
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/..\FrameXML\UI.xsd">
	<Script file="Gme.lua"/>
	<Frame name="GME_Frame">
		<Scripts>
			<OnLoad>
				 this:RegisterEvent("CHAT_MSG_WHISPER");
			</OnLoad>
			<OnEvent function="GME_Event"/>
		</Scripts>
	</Frame>
</Ui>
LUA
Code:
SLASH_GME1 = "/GME";
SlashCmdList["GME"] = function(msg)
	print("Worked")
end

function GME_Event()
	print("Event Fired");
	if event == "CHAT_MSG_WHISPER" then
		print("Success");
	end
end
ToC
Code:
## Interface: 20003
## Title: GME
Gme.xml
Gme.lua
Only the slash-command do anything, the events are, as far as I have understood, never even fired.

Thank you all for your time, and I just hope this was the right place in the forum.

Last edited by Renee : 05-05-09 at 02:27 AM.
  Reply With Quote
05-04-09, 06:45 PM   #2
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
What does your TOC file look like?
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.
  Reply With Quote
05-04-09, 11:17 PM   #3
Exawatt
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Feb 2009
Posts: 36
The code worked fine for me. The problem must be, as Torhal mentions, in the TOC or in naming.

Or possibly in something you removed when you posted the code, as I'm assuming you're not actually working with an addon and functions composed entirely of the letter "X", and have removed code that might identify your addon/intention.
  Reply With Quote
05-05-09, 02:23 AM   #4
Renee
A Defias Bandit
Join Date: May 2009
Posts: 3
Ah, of course, forgot the toc.
And I took in the old name, too many X'es otherwise. Might change it later though ^.-

And I changed the first post to have everything, easier to read

Last edited by Renee : 05-05-09 at 02:25 AM.
  Reply With Quote
05-05-09, 04:53 AM   #5
Renee
A Defias Bandit
Join Date: May 2009
Posts: 3
...and now it suddenly begun to work.
I'll thank for the answers, and hope that this doesn't happen again.
  Reply With Quote
05-05-09, 10:47 AM   #6
Exawatt
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Feb 2009
Posts: 36
Originally Posted by Renee View Post
XML
Code:
<Script file="Gme.lua"/>
ToC
Code:
Gme.lua
These are redundant.
  Reply With Quote
05-09-09, 01:17 AM   #7
tsadok
An Aku'mai Servant
 
tsadok's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 32
Originally Posted by Exawatt View Post
These are redundant.
It took me 18 months to find that problem with my addon. All it produced was a mysterious nil error. I taught myself hooking to make it go away
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Just where did it go wrong?


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