View Single Post
07-19-18, 02:30 PM   #3
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,877
Also, for future reference, if you want to pass information between modules (.lua files) within the same addon, each .lua file is "passed" two parameters, the name of the addon and a table that is exlcusive to that addon.

To use them, at the top of each file add

Code:
local addonName, addonTable = ...
the names can be anything you like.

You can create a function
Code:
function addonTable:GetMapNameByID() 
    ...
end
Anywhere within your addon .lua files you can now call:
Code:
addonTable:GetMapNameByID()
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote