View Single Post
05-07-14, 11:01 PM   #3
WhiteWolf87
A Deviate Faerie Dragon
 
WhiteWolf87's Avatar
AddOn Compiler - Click to view compilations
Join Date: Dec 2013
Posts: 16
Originally Posted by Nimhfree View Post
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
Thank you for responding. Gave it a try and nothing loaded when i tested it

Last edited by WhiteWolf87 : 05-07-14 at 11:32 PM.
  Reply With Quote