View Single Post
03-20-13, 12:28 PM   #19
Nibelheim
local roygbi-
 
Nibelheim's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 1,600
Originally Posted by SDPhantom View Post
From the code you posted, this starts an error propagating from the following line:
Code:
local Funs, Settings = unpack(select(2, ...))
This is because the shared addon table is empty and as such, both variables will be set to nil. Further code raises an attempt to index nil error.
Woops. Forgot a part. First file should be:
Lua Code:
  1. local addon, ns = ...
  2. ns[1] = {}
  3. ns[2] = {}
  4.  
  5. local Funs, Settings = unpack(select(2, ...))
  6.  
  7. Settings.defaults = {
  8.    x = 0,
  9.    y = 0,
  10. }
  11.  
  12. Funs.updateSettings = function()
  13.     -- do stuff
  14. end
  Reply With Quote