private static int SetActionStatus(IntPtr L) { int result; try { ToLua.CheckArgsCount(L, 2); RoleAction roleAction = (RoleAction)ToLua.CheckObject(L, 1, typeof(RoleAction)); int actionStatus = (int)LuaDLL.luaL_checknumber(L, 2); roleAction.SetActionStatus(actionStatus); result = 0; } catch (Exception e) { result = LuaDLL.toluaL_exception(L, e, null); } return(result); }