WoW:API LoadAddOn: Difference between revisions

updated example code: removed unnecessary parens; minor formatting changes
No edit summary
(updated example code: removed unnecessary parens; minor formatting changes)
Line 16: Line 16:


=== Usage ===
=== Usage ===
  local loaded,reason = LoadAddOn("MyOtherAddOn")
  local loaded, reason = LoadAddOn("MyOtherAddOn")
  if (not loaded) then
   if (reason == "DISABLED") then
if not loaded then
    do stuff
   if reason == "DISABLED" then
   elseif (reason == "MISSING") then
    -- do stuff
    do other stuff
   elseif reason == "MISSING" then
   elseif (reason == "CORRUPT") then
    -- do other stuff
    do something else
   elseif reason == "CORRUPT" then
   elseif (reason == "INTERFACE_VERSION") then
    -- do something else
    do something different
   elseif reason == "INTERFACE_VERSION" then
    -- do something different
   end
   end
  else
else
   do something special
   -- do something special
  end
end


== Details ==
== Details ==
Anonymous user