WoW:API LoadAddOn: Difference between revisions

1,024 bytes added ,  10 July 2007
Moved Reason Codes to →‎Details
(Moved Reason Codes to →‎Details)
Line 15: Line 15:


:;loaded : Flag - Indicates if the AddOn was loaded, 1 if it is, nil if it is not.
:;loaded : Flag - Indicates if the AddOn was loaded, 1 if it is, nil if it is not.
:;reason : String - The reason why the AddOn cannot be loaded. This is nil if the addon was loaded, otherwise it contains a code indicating the reason. (Observed reason codes: "DISABLED", "NOT_DEMAND_LOADED", "MISSING", "CORRUPT", "INTERFACE_VERSION", "DEP_MISSING", "DEP_INTERFACE_VERSION" and I asume other DEP_ reasons)
:;reason : String - The reason why the AddOn cannot be loaded. This is nil if the addon was loaded, otherwise it contains a code indicating the reason.


=== Usage ===
=== Usage ===
Line 35: Line 35:
== Details ==
== Details ==
: Prior to the 1.8 patch, this could be used to load addons which were not on-demand if they were disabled at start up and then enabled during the play session. The 1.8 patch restricted this to ONLY addons which are truly marked on demand in their .toc files (## LoadOnDemand: 1).
: Prior to the 1.8 patch, this could be used to load addons which were not on-demand if they were disabled at start up and then enabled during the play session. The 1.8 patch restricted this to ONLY addons which are truly marked on demand in their .toc files (## LoadOnDemand: 1).
===Reason Codes===
(taken from FrameXML\GlobalStrings.lua)<br />
(they are all prefixed with "ADDON_", use getglobal("ADDON_"..reason) for localizing)
:;BANNED : "Banned"; -- Addon is banned by the client.
:;CORRUPT : "Corrupt"; -- The addon's file(s) are corrupt.
:;DEP_BANNED : "Dependency banned"; -- Addon's dependency is banned by the client.
:;DEP_CORRUPT : "Dependency corrupt"; -- The addon's dependency cannot load because its file(s) are corrupt.
:;DEP_DISABLED : "Dependency disabled"; -- The addon cannot load without its dependency enabled.
:;DEP_INCOMPATIBLE : "Dependency incompatible"; -- The addon cannot load if its dependency cannot load.
:;DEP_MISSING : "Dependency missing"; -- The addon's dependency is physically not there.
:;DEP_NOT_DEMAND_LOADED : "Dependency not loadable on demand"; -- The addon's dependency must be loadable on demand too.
:;DISABLED : "Disabled"; -- Addon is disabled on the character select screen.
:;INCOMPATIBLE : "Incompatible"; -- The addon is too old.
:;MISSING : "Missing"; -- The addon is physically not there.
:;NOT_DEMAND_LOADED : "Not loadable on demand"; -- As of 1.8 only addons marked as LoadOnDemand can be loaded via this function.


----
----
__NOTOC__
__NOTOC__
Anonymous user