GameDoesNotExist









How do I use Game Does Not Exist
Below are practical examples compiled from projects for learning and reference purposes

Featured Snippets


File name: NetworkingPeer.cs Copy
822     private void GameEnteredOnGameServer(OperationResponse operationResponse)
823     {
824         if (operationResponse.ReturnCode != 0)
825         {
826             switch (operationResponse.OperationCode)
827             {
828                 case OperationCode.CreateGame:
829                     if (PhotonNetwork.logLevel >= PhotonLogLevel.Informational)
830                     {
831                         Debug.Log("Create failed on GameServer. Changing back to MasterServer. Msg: " + operationResponse.DebugMessage);
832                     }
833                     SendMonoMessage(PhotonNetworkingMessage.OnPhotonCreateRoomFailed, operationResponse.ReturnCode, operationResponse.DebugMessage);
834                     break;
835                 case OperationCode.JoinGame:
836                     if (PhotonNetwork.logLevel >= PhotonLogLevel.Informational)
837                     {
838                         Debug.Log("Join failed on GameServer. Changing back to MasterServer. Msg: " + operationResponse.DebugMessage);
839                         if (operationResponse.ReturnCode == ErrorCode.GameDoesNotExist)
840                         {
841                             Debug.Log("Most likely the game became empty during the switch to GameServer.");
842                         }
843                     }
844                     SendMonoMessage(PhotonNetworkingMessage.OnPhotonJoinRoomFailed, operationResponse.ReturnCode, operationResponse.DebugMessage);
845                     break;
846                 case OperationCode.JoinRandomGame:
847                     if (PhotonNetwork.logLevel >= PhotonLogLevel.Informational)
848                     {
849                         Debug.Log("Join failed on GameServer. Changing back to MasterServer. Msg: " + operationResponse.DebugMessage);
850                         if (operationResponse.ReturnCode == ErrorCode.GameDoesNotExist)
851                         {
852                             Debug.Log("Most likely the game became empty during the switch to GameServer.");
853                         }
854                     }
855                     SendMonoMessage(PhotonNetworkingMessage.OnPhotonRandomJoinFailed, operationResponse.ReturnCode, operationResponse.DebugMessage);
856                     break;
857             }
858
859             this.DisconnectToReconnect();
860             return;
861         }
862
863         this.State = global::PeerState.Joined;
864         this.mRoomToGetInto.isLocalClientInside = true;
865
866         Hashtable actorProperties = (Hashtable)operationResponse[ParameterCode.PlayerProperties];
867         Hashtable gameProperties = (Hashtable)operationResponse[ParameterCode.GameProperties];
868         this.ReadoutProperties(gameProperties, actorProperties, 0);
869
870         // the local player's actor-properties are not returned in join-result. add this player to the list
871         int localActorNr = (int)operationResponse[ParameterCode.ActorNr];
872
873         this.ChangeLocalID(localActorNr);
874         this.CheckMasterClient(-1);
875
876         if (this.mPlayernameHasToBeUpdated)
877         {
878             this.SendPlayerName();
879         }
880
881         switch (operationResponse.OperationCode)
882         {
883             case OperationCode.CreateGame:
884                 SendMonoMessage(PhotonNetworkingMessage.OnCreatedRoom);
885                 break;
886             case OperationCode.JoinGame:
887             case OperationCode.JoinRandomGame:
888                 // the mono message for this is sent at another place
889                 break;
890         }
891     }

GameDoesNotExist 121 lượt xem

Gõ tìm kiếm nhanh...