Loads a LoadOnDemand-capable addon. If the given addon has dependencies which are also LoadOnDemand-capable, those addons will be loaded as well. This function will not load disabled addons.
See also Addon-related functions.
Signature:
loaded, reason = LoadAddOn("name") or LoadAddOn(index)
Arguments:
name- Name of an addon (name of the addon's folder and TOC file, not the Title found in the TOC) (string)index- Index of an addon in the addon list (between 1 andGetNumAddOns()) (number)
Returns:
loaded- 1 if loading the addon was successful; otherwise nil (number)reason- If the addon could not be loaded, an unlocalized string token indicating the reason for failure. Localized strings for display can be found by prepending"ADDON_"; e.g.ADDON_DEP_MISSING == "Dependency missing". (string)BANNED- BannedCORRUPT- CorruptDEP_BANNED- Dependency bannedDEP_CORRUPT- Dependency corruptDEP_DISABLED- Dependency disabledDEP_INCOMPATIBLE- Dependency incompatibleDEP_INSECURE- Dependency insecureDEP_INTERFACE_VERSION- Dependcy out of dateDEP_MISSING- Dependency missingDEP_NOT_DEMAND_LOADED- Dependency not loadable on demandDISABLED- DisabledINCOMPATIBLE- IncompatibleINSECURE- InsecureINTERFACE_VERSION- Out of DateMISSING- MissingNOT_DEMAND_LOADED- Not loadable on demand