View Single Post
08-03-18, 03:00 PM   #4
candrid
Premium Member
 
candrid's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 61
Originally Posted by myrroddin View Post
Also, your definition of "Global variable" is wrong.
Lua Code:
  1. someVar -- global variable
  2. local someVar -- local variable to file scope
  3. function MyFunc() -- global function
  4. local function MyFunc() -- local function to file scope
  5.  
  6. -- addonName is the string name of your addon, like "BigWigs" or "My Awesome Addon"
  7. -- addonData is the private table passed to each Lua file within the same addon. useful for things like localization through multiple Lua files
  8. -- ... is a variable argument, or vararg
  9. local addonName, addonData = ...
Awesome thanks!
  Reply With Quote