You need to register events before you can trigger them:
Lua Code:
for k, v in pairs(Eavu) do
frame:RegisterEvent(k); -- Register all events for which handlers have been defined
end
frame:SetScript("OnEvent", function(self, event, ...)
Eavu[event](self, ...); -- call one of the functions above
end)
I think coding when you're sick is a bad idea, i tried do "programming" once i was drunk, thex next day was a massive omg wtf rollback.
However that table should contain the events you want to register:
Lua Code:
local Events = {
[1] = "ADDON_LOADED",
[2] = "COMBAT_LOG_EVENT_UNFILTERED",
[3] = "ETCETC"
}
for k, v in pairs(Events) do
frame:RegisterEvent(v); -- Register all events for which handlers have been defined
end
Also if you use the in pairs loop then you need to register it's
v part not the k. (But it depends how your table looks like.)