View Single Post
04/28/14, 01:46 PM   #11
Xrystal
caritas omnia vincit
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 369
That was one of my first questions. But alas there apparently isn't. Wow came into using it quite late so hopefully eso will add it sooner. But as had been mentioned I just use an addon related name as a global table for the addon.


Originally Posted by Myrroddin View Post
Is there no vararg? Warcraft added it around Burning Crusade or so, and Rift has had it since day one.

Code:
-- returns string, table
-- if put at the top of each .lua file in an AddOn, then the table is not only local, it is accessible to any Lua file in the AddOn
local AddOn, AddOnTable = ... -- the ... is a vararg
function AddOn:SomeFunction()
    AddOnTable[some_data] = someData
    table.insert(AddOnTable, someOtherData)
end
**EDIT Sorry for the broken up code blocks. The site is broken, apparently
  Reply With Quote