View Single Post
04-05-22, 01:35 PM   #4
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 666
The first argument in the ADDON_LOADED payload is the name of the addon that just loaded, equal to the filename of the toc which is also passed to every file loaded within an addon. You are not checking for that, so your addon is repeating your initialize and setup functions dozens of times for every addon that loads.

At the top of main.lua, add the following:

Code:
local addonName = ...
Then compare the first argument of ADDON_LOADED to addonName

Last edited by Kanegasi : 04-05-22 at 01:38 PM.
  Reply With Quote