View Single Post
12-11-12, 09:33 PM   #9
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Code outside of a function runs immediately when WoW reads your file.

Code inside of a function does not run until that function is called. In your example, the code inside the function you set as your frame's OnEvent script does not run until the game fires the ADDON_LOADED event with your addon's name as the first argument. That happens after all of your addon's files and saved variables have been read.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote