Originally Posted by kaytotes
Oh my god that's it as soon as I saw it clicked.
I'd just been going through my .TOC file and removing modules line by line to find a culprit for the error and narrowed it down to my player.lua and target.lua
I'll make a far more concerted effort to use local wherever appropriate! Thank you so much i've been tearing my hair out for a couple weeks.
|
don't forget you can also use addon wide variables via the shared table you can access at the top of each lua file.
If you have never used it, do something similar to the following at the top of any file you want to access the addon wide table. The second line is just something I add in case it is initially nil rather than an empty table.
local addonName, addonData = ...
addonData = addonData or {}
I use local for variables that are only needed for that file, or within code blocks and anything that I need access to across the whole addon I used the addonData table. This enables me to separate functionality across multiple files, which enables me to better share individual files with other addons that need the same functionality. Such as Translation tools.