I've been working on an addon but I can't get it to fire up it's event. This is the xml code I'm using:
Code:
<OnLoad>
antiportal:RegisterEvent("CHAT_MSG_WHISPER");
antiportal_OnLoad();
</OnLoad>
<OnEvent>
antiportal_OnEvent(); <!-- Upon receiving a whisper, antiportal_OnEvent()-->
</OnEvent>
Everything works fine except that antiportal_OnEvent(); doesn't fire upon receiving whispers. Well it doesn't fire at all actually. The event itself is just a basic DEFAULT_CHAT_FRAME:AddMessage("Event fired"); to check if it works. So what am I doing wrong?