If you're not getting Lua errors, the natural assumption is that the code you want isn't being fired.
You might want to try a less generic event handler.
Code:
local frame = CreateFrame('Frame', 'FrameName', UIParent)
frame:SetScript('OnEvent', function (self,event,...)local f = self[event]
if f thenf(self,...)
end)
-- Creating a frame returns a table, so you can add stuff onto it as you please. This event handler calls frame.EVENTNAME with a reference to the frame (self) and the events args (...) when an event occurs. Lots easier to work with than a whole bunch of if/then statements, if you ask me.
-- colon = implied 'self'
function frame:COMBAT_LOG_UNFILTERED(timestamp, event, srcguid,srcname,srcflags, destguid,destname,destflags, spellid,spellname)
-- stuff
end
-- alternative syntax #1 - does the exact same thing
function frame.PLAYER_ENTERING_WORLD(self)
-- more stuff
end
-- alternative syntax #2 - again, same
frame.PLAYER_ENTERING_BATTLEGROUND = function (self)
-- yet more stuff
end
-- remember to register your events.
When all else fails, put a
print('Hey, it works!') where the code seems not to work. If the message occurs ingame, you know it's at least trying to do something.