Thread Tools Display Modes
02-02-07, 08:54 AM   #1
Psiphos
A Defias Bandit
Join Date: Feb 2007
Posts: 2
Events - i am a noob.

This is my first addon, but i have worked with several other scripting languages before and i have created complicated macros for guild memebers.

I am having a problem with registering an event. It just doesn't react to the event, and i really don't get why. It might be due to loads pre-2.0 information available everywhere. My LUA looks like this:

Code:
function RLM_OnLoad
	this:RegisterEvent("UNITDIESOTHER");
end()

function RLM_OnEvent(event)
	if(event == "UNITDIESOTHER") then
		message("lol");
	end	
end
Furthermore my XML looks like this:

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">
	<Script file="RLM.lua"/>

	<Frame name="RLM" frameStrata="HIGH" toplevel="true" enableMouse="true" movable="true" parent="UIParent">
		<Anchors>
			<Anchor point="TOP"/>
		</Anchors>
		<Size>
			<AbsDimension x="45" y="26"/>
		</Size>	
		<Layers>
			.. basically just some text in my frame ..
		</Layers>
		<Frames>
			.. more frames, buttons and stuff ..
		</Frames>

		<Scripts>
			<OnLoad>
				RLM_OnLoad();
			</OnLoad>
			<OnEvent>
				RLM_OnEvent(event);
			</OnEvent>			
		</Scripts>
	</Frame>
</Ui>
I really don't get why i dont get a "lol" message when i kill a rat ingame.

Any help would be appreciated.

/Psiphos
  Reply With Quote
02-04-07, 11:40 AM   #2
Psiphos
A Defias Bandit
Join Date: Feb 2007
Posts: 2
nvm, i fixed it.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Events - i am a noob.


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