View Single Post
12-26-17, 04:20 PM   #2
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,879
The numbers come from when the game exports a table (SavedVariable) without labels specified for keys
Code:
{
  [1] = "Something",
  [2] = "Something else",
}
Code:
{
  "Something",
  "Something else",
}
will be saved as
Code:
{
  "Something", -- [1]
  "Something else", -- [2]
}
You would be better served doing your initial check at PLAYER_LOGIN after ALL the startup addons have had a chance to load.

Using ADDON_LOADED (with your addon as the execution marker) will show all the addons that have been loaded prior to yours (and if they were succesful or not) and addons that are still to be loaded (after yours) but at this point, it is undetermined if they will load.

You can use ADD_LOADED to check for addons that load during play (Load On Demand) ie. register the event after you've done your check at PLAYER_LOGIN.

Edit:
but some addons do not have true or false
IsAddonLoaded returns true or nil. A table entry of nil doesn't exists so:
Code:
AddonListDB[i] = {title,loaded}
will only show an entry for "loaded" when it is true.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 12-26-17 at 05:46 PM.
  Reply With Quote