View Single Post
07/04/14, 02:59 AM   #4
zgrssd
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 280
Originally Posted by simosf View Post
Hello - thank you for your answer and your time.

I only copy/pasted part of the code - so it was not clear.
Yes my real code has first the local function declared and later on on the code i put the event.

The event is fired without any problems, as i can see at the label what i hit.

In order to avoid the 'overwrite label' scenario, i started fight with a mob - but i never attacked it, so it was only the mob attacking me. Still nothing showing his attacks. If I hit, i can see in my addon my name and my attack, but not when the mob attacks me. Any other idea?
You asume that if you do not attack the event will not fire for you. It could very well be that the event fires for you directly after every attack the mob makes against you. I never used it so I am not sure.
But I do know that asumptions are the primary source of bugs.

Restructure it tou output in the chat. It should at least give you a hint at was is really happening.

And please give us your full code. I spend half of yesterday trying to figure out why my logic was not working, till I realised I had declared a second (lower tier) local variable. So my top level local that was fed to return was never even written too.
  Reply With Quote