- Home /
PUN 2 - Attempting to rejoin room and getting "User does not exist in this game".
I have a room set up as -
 RoomOptions roomOptions = new RoomOptions();
                 roomOptions.IsVisible = false;
                 roomOptions.MaxPlayers = 5;
                 roomOptions.PlayerTtl = 3600;
                 roomOptions.PublishUserId = true;
                 PhotonNetwork.JoinOrCreateRoom(roomName, roomOptions, TypedLobby.Default);
I have two players in the room and then I close one of them by stopping the play mode in Unity). Upon loading the game again I do -
 string userId = PlayerPrefs.GetString("userId");
             if (userId != "")
             {
                 PhotonNetwork.AuthValues = new AuthenticationValues(PlayerPrefs.GetString("userId"));
             }
             PhotonNetwork.ConnectUsingSettings();
This seems to work as I get the same UserId as before. However, when I user "RejoinRoom" It fails with the message "User does not exist in this game".
The room name is correct.
Please assist.
Answer by DaveA · May 13, 2021 at 12:19 AM
PlayerTTl is, I believe, in ms, so that's just 3.6 seconds to reconnect before he's removed from the server. Also, if the room goes empty, your RoomTtl is 0 so it is removed immediately. You might want to increase those timings.
Your answer
 
 
             Follow this Question
Related Questions
Photon: I call PhotonNetwork.LeaveRoom() but my character doesn't leave 1 Answer
How do I instantiate and set the parent of a Gameobject using Photon? 0 Answers
[PHOTON PUN] Players cant shoot each other? 1 Answer
Photon Unity Networking - Player Camera Instantiate 0 Answers
Photon Server, Tutorial? 1 Answer
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                