View Single Post
05/27/14, 02:23 PM   #7
stjobe
 
stjobe's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 60
Originally Posted by Seerah View Post
I haven't checked, but is GetUnitClassId() not available to call in the main chunk of your addon?
Originally Posted by Xrystal View Post
I would suspect anything Player related would not be accessible until the player is first activated.
GetUnitClassId("player") can be called before EVENT_PLAYER_ACTIVATED, it works just fine. The function above runs on EVENT_ADD_ON_LOADED, but I also have several other initialization methods that run on EVENT_PLAYER_ACTIVATED.

I was merely suggesting that since the Lua code is compiled (and can therefore throw compile-time errors), perhaps something similar happens with the XML files for an addon - even if it is disabled.
  Reply With Quote