m
→Parameters
mNo edit summary |
m (→Parameters) |
||
| Line 14: | Line 14: | ||
:;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") | :;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") | ||
=== Usage === | |||
local loaded,reason = LoadAddOn("MyOtherAddOn") | |||
if (not loaded) then | |||
if (reason == "DISABLED") then | |||
do stuff | |||
elseif (reason == "MISSING") then | |||
do other stuff | |||
elseif (reason == "CORRUPT") then | |||
do something else | |||
end | |||
return | |||
end | |||
== Details == | == Details == | ||