View Single Post
05-07-14, 10:07 PM   #2
Nimhfree
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 267
Bear in mind that it is late and I am really tired.

It appears that the signature for your OnEvent function should be (self, event, ...) instead of (event). What you are probably doing is comparing "ADDON_LOADED" to self instead of event.

Alos, in processing ADDON_LOADED you also want to check ... because the first parameter passed there will be the name of an addon. If it is not your addon name you should ignore it and not do any work. Basically your addon will be able to see other addons get loaded and it will be sent ADDON_LOADED for each. You are not guaranteed a specific order of those addon loads either.

So, you might want to change your code to:

function lf:OnEvent(self, event, ...)
if "ADDON_LOADED" == event then
if "LCI" == ... then
CheckNewChar()
end
end
end
  Reply With Quote