static int TestCheckParamNumber(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); TestExport obj = (TestExport)ToLua.CheckObject(L, 1, typeof(TestExport)); int[] arg0 = ToLua.CheckParamsNumber<int>(L, 2, count - 1); int o = obj.TestCheckParamNumber(arg0); LuaDLL.lua_pushinteger(L, o); return 1; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e); } }
private static int TestCheckParamNumber(IntPtr L) { int result; try { int num = LuaDLL.lua_gettop(L); TestExport testExport = (TestExport)ToLua.CheckObject(L, 1, typeof(TestExport)); int[] ns = ToLua.CheckParamsNumber <int>(L, 2, num - 1); int n = testExport.TestCheckParamNumber(ns); LuaDLL.lua_pushinteger(L, n); result = 1; } catch (Exception e) { result = LuaDLL.toluaL_exception(L, e, null); } return(result); }