private static int Login(IntPtr L) { int result; try { ToLua.CheckArgsCount(L, 3); PlatformUtil platformUtil = (PlatformUtil)ToLua.CheckObject(L, 1, typeof(PlatformUtil)); string customParam = ToLua.CheckString(L, 2); LuaFunction luaFunc = ToLua.CheckLuaFunction(L, 3); platformUtil.Login(customParam, luaFunc); result = 0; } catch (Exception e) { result = LuaDLL.toluaL_exception(L, e, null); } return(result); }