Skip to content
everloot

Lore archive · Warcraft Wiki, 2023 dump

API UIParentLoadAddOn

Last wiki revision 2019-12-20

Load or reload an addon.

loaded = UIParentLoadAddOn( index or "addonName" );

  • (index or "addonName")
  • index: Integer - The index of the AddOn in the user's AddOn list. Note that you cannot access Blizzard-provided AddOns through this mechanism.
  • addonName: String - The name of the addon you want to load or reload.
  • loaded: Flag - Indicates if the AddOn was loaded, 1 if it is, nil if it is not.
  • An error message is issued if the addon failed to load.

local loaded = UIParentLoadAddOn( "MyFunkyAddon" );

loaded = 1 or nil

  • If the addon fails to load, it is added to a list of failed addons. If you try to load the addon again without reloading the UI, you will not be notified of failure unless you use LoadAddOn and write your own edge case.
  • As of patch 1.8, you can only use this for addons that are marked on demand in their .toc files (## LoadOnDemand: 1).

Functionally similar to this: local loaded, reason = LoadAddOn(name); if ( not loaded ) then message(format(ADDON_LOAD_FAILED, name, _G["ADDON_"..reason])); end

Source

https://warcraft.wiki.gg/wiki/API_UIParentLoadAddOn · retrieved 2023-11-13 · CC BY-SA 4.0

Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.

This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.