View Single Post
03/24/14, 06:11 PM   #15
Xrystal
caritas omnia vincit
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 369
Yes that would work as MS = {} is a global table available to all addons, but each file would only be able to access the MS one, so you would have to add that local line in each file if you want to reference it in the same way.


File 1:
-- Create or use the existing table
UniqueName_MS = UniqueName_MS or {}

-- Create a local reference to the table
local thisMS = UniqueName_MS


File 2:
-- Create or use the existing table
UniqueName_MS = UniqueName_MS or {}

-- Create a local reference to the table
local thisMS = UniqueName_MS


Something like this near the top of your files will simulate an addon wide variable but it is in essence a global variable for all addons to access, so bear that in mind.
  Reply With Quote