View Single Post
10-16-19, 02:00 AM   #3
Urtgard
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Apr 2016
Posts: 25
Line 119: Your addon is called "DevilsHuntersClassic" and not "DevilsHunters"

And all the functions and variables you use should be locals.

One stumbling block for Lua programmers coming from other languages is the fact that all variables are global unless specified otherwise. Many times, the use of global variables is necessary: saved variables are created via the global environment; all API functions and UI frames are in the global namespace. However, globals come at a cost of both performance, and naming conflicts.

Globals are inefficient to access compared to locals. Whenever a global is accessed, Lua has to call the internal equivalent of getfenv() to figure out where to retrieve the global from. Local variables, on the other hand, are stored on a stack.

https://wow.gamepedia.com/UI_best_pr...ocal_variables
  Reply With Quote