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