View Single Post
08-02-08, 07:09 PM   #1
LBXZero
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 61
Trying to pass a value to a function table

For my mod, I am adding functions to add support for other existing addons. When this mod loads, it checks if the addons exist and adds entries to a table

Code:
(on load code) 
...
if (Clique) then
 ADDONS_DETECTED["Clique"] = CSB.Clique
end
...
(on load code)
Then when certain buttons are made, a function is called to go through the list and use every function listed

Code:
function CSB_AddonExtensions( spellButton )
 for index, action in pairs(ADDONS_DETECTED) do
  action(spellButton);
 end	
end

function CSB:Clique( spellButton)
...
My problem is that the spellButton parameter is not being passed to the function addressed in the table, but the function is ran. The parameter does exist in CSB_AddonExtensions function, but it does not exist in the function called from the table.

Last edited by LBXZero : 08-02-08 at 07:38 PM.
  Reply With Quote