m
Move page script moved page API LoadAddOn to WoW:API LoadAddOn without leaving a redirect
No edit summary |
m (Move page script moved page API LoadAddOn to WoW:API LoadAddOn without leaving a redirect) |
||
| (3 intermediate revisions by 3 users not shown) | |||
| Line 8: | Line 8: | ||
:;index : Integer - The index of the AddOn in the user's AddOn list. Note that you cannot access Blizzard-provided AddOns through this mechanism. | :;index : Integer - The index of the AddOn in the user's AddOn list. Note that you cannot access Blizzard-provided AddOns through this mechanism. | ||
:;name : String - The name of the AddOn to be | :;name : String - The name of the AddOn to be queried. You can access Blizzard-provided AddOns through this mechanism. | ||
=== Returns === | === Returns === | ||
:loaded, reason | :loaded, reason | ||
| Line 16: | Line 17: | ||
=== Usage === | === Usage === | ||
local loaded,reason = LoadAddOn("MyOtherAddOn") | local loaded, reason = LoadAddOn("MyOtherAddOn") | ||
if | if not loaded then | ||
if reason == "DISABLED" then | |||
elseif | -- do stuff | ||
elseif reason == "MISSING" then | |||
elseif | -- do other stuff | ||
elseif reason == "CORRUPT" then | |||
elseif | -- do something else | ||
elseif reason == "INTERFACE_VERSION" then | |||
-- do something different | |||
end | end | ||
else | |||
do something special | -- do something special | ||
end | |||
== Details == | == Details == | ||
| Line 49: | Line 51: | ||
:;MISSING : "Missing"; -- The addon is physically not there. | :;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. | :;NOT_DEMAND_LOADED : "Not loadable on demand"; -- As of 1.8 only addons marked as LoadOnDemand can be loaded via this function. | ||
:;INTERACE_VERSION : -- Unknown, presumably the interface version in the .toc file is incorrect | |||