I'm using Lua interface on c# to pass an object I created to lua's function. It successfully calls the function, but lua is keep throwing an error:
LuaInterface.LuaException: /hook.lua:32: attempt to index local 'objj' (a nil value)
This is the c# code:
public class PerObj
{
public string name;
public PerObj()
{
}
}
PerObj obj = new PerObj();
LuaFunction lf = lua.GetFunction ("item.HookMe");
lf.Call(obj);
And here's the lua code:
function item:HookMe(objj)
objj.name= "lalala"
end
The function is actually being called, but I'm not sure it's not working...