I set up the following method to reproduce a problem I am having where passing a table from one lua state through a function parameter in another results in the table being null.
In this case the table seems to be being interpreted as a function. I have no idea why.
Lua scope = new Lua();
Lua scope2 = new Lua();
scope2.DoString("t = { Data = 3 }");
scope.DoString("function values(key, model) return key, model end");
var func = (LuaFunction)scope["values"];
var t = (LuaTable)scope2["t"];
object[] results = func.Call("Hello", t);
var tableFunc = results[1] as LuaFunction;
var tableTable = results[1] as LuaTable;
object[] tableFuncResult = tableFunc.Call();
The value of tableFuncResult after running this snippet is an object array { null, null }. tableTable is null. Instead tableFunc should be null and tableTable should contain the table defined in scope2.