ChaosInc
11-10-2006, 03:20 PM
Working on a personal ignore mod, but apparently I'm missing something in the code cause I keep getting an error when I execute the slash command.
XRIgnore_List = {};
function XRIgnore_Add(name)
if (XRIgnore_Verbose) then
DEFAULT_CHAT_FRAME:AddMessage("Adding ".. name.. " to ignore list.");
end;
table.insert(XRIgnore_List, name); -- add name to list
end;
When the command is executed:
Error: Interface\Addons\XRIgnore\XRIgnore.lua:(line number, 7 in the above example):bad argument #1 to 'insert' (table expected, got nil)
As can be seen the table is clearly defined outside as global, but for some reason it's saying it's not there. I've used this exact snippet in Raidswap and it worked fine, so I'm not sure what the prob is.
XRIgnore_List = {};
function XRIgnore_Add(name)
if (XRIgnore_Verbose) then
DEFAULT_CHAT_FRAME:AddMessage("Adding ".. name.. " to ignore list.");
end;
table.insert(XRIgnore_List, name); -- add name to list
end;
When the command is executed:
Error: Interface\Addons\XRIgnore\XRIgnore.lua:(line number, 7 in the above example):bad argument #1 to 'insert' (table expected, got nil)
As can be seen the table is clearly defined outside as global, but for some reason it's saying it's not there. I've used this exact snippet in Raidswap and it worked fine, so I'm not sure what the prob is.