Quantcast WoWInterface - View Single Post - Need help loading SavedVariable setting.
View Single Post
08-10-19, 03:05 PM   #8
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,670
Or, an edit to Fizzlemizz's code (that is more relevant to what you are learning):
Lua Code:
  1. local f = CreateFrame("Frame")  --oh, and there was a typo here
  2. f:SetScript("OnEvent", function(self, event, addon)
  3.     if addon == "YourAddonNameHere" then
  4.         if SimpleMap == 1 then
  5.             PlayerMovementFrameFader.AddDeferredFrame(WorldMapFrame, .3, 3.0, .5)
  6.         elseif SimpleMap == 3 then
  7.             PlayerMovementFrameFader.AddDeferredFrame(WorldMapFrame, 1, 3.0, .5)
  8.         end
  9.     end
  10. end)
  11. f:RegisterEvent("ADDON_LOADED")

https://wow.gamepedia.com/AddOn_loading_process
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote