Originally Posted by sezz
GetNumFactions() returns 0 at the time you're calling it, C_Covenants.GetActiveCovenantID() aswell.
Maybe you could get all the faction data in OnEnable instead? I think AceAddon's OnEnable is PLAYER_LOGIN, which should be fine (you also avoid running code that isn't needed when the user has disabled the addon ingame).
|
Good to know. I did solve the other issue, with the name being nil. I'll check my code to see where I can adjust GetNumFactions() and C_Covenants.GetActiveCovenantID().