I noticed that you are registering the event before you defined the handler. So right now your code is registering nil as a event handler - not your code.
Edit: Actually it is registering whatever happens to be in the global variable "MyEventOnHit". I just asumed it would be nil.
This would be the proper order:
Lua Code:
--Declare the handler
local function MyEventOnHit( eventCode , result , isError , abilityName, abilityGraphic, abilityActionSlotType, sourceName, sourceType, targetName, targetType, hitValue, powerType, damageType, log )
lblCounter:SetText(sourceName..":"..abilityName)
end
--Register then handler with the event
EVENT_MANAGER:RegisterForEvent( "tlw" , EVENT_COMBAT_EVENT , MyEventOnHit )
Also, it could be that a second event firing directly after the NPC event is overwriting the label. I would use d and .. to output the data into chat.
Lua Code:
--Declare the handler
local function MyEventOnHit(...)
--takes any amount of parameters and feeds them to d()
d(...)
end
EVENT_MANAGER:RegisterForEvent( "tlw" , EVENT_COMBAT_EVENT , MyEventOnHit )