Turn based: "Game Full" or "Does Not Exist" when attempting to rejoin.
Options
Hi,
So I create and join a random game with the following room options:
RoomOptions roomOptions = new RoomOptions ();
roomOptions.MaxPlayers = 2;
roomOptions.CustomRoomProperties = customRoomProperties;
roomOptions.CustomRoomPropertiesForLobby = roomPropertiesInLobby;
roomOptions.CheckUserOnJoin = true;
roomOptions.EmptyRoomTtl = 60000;
roomOptions.PlayerTtl = 60000;
roomOptions.IsOpen = true;
roomOptions.IsVisible = true;
this.OpCreateRoom (null, roomOptions, null);
I get my two clients connected and playing the game fine. Then I close my app, start my app and attempt to enter the game again; called with:
this.OpJoinRoom (roomName, actorNumber);
And I get a "Game Full" response. I close the app and wait a few moments more, start app and try to join room and I get a "Game does not exist." response.
Can anyone tell me what I'm doing wrong here? The roomName, actorNumber, room details, and game state are all being saved and retrieved from PlayFab cloud server.
Thanks.
So I create and join a random game with the following room options:
RoomOptions roomOptions = new RoomOptions ();
roomOptions.MaxPlayers = 2;
roomOptions.CustomRoomProperties = customRoomProperties;
roomOptions.CustomRoomPropertiesForLobby = roomPropertiesInLobby;
roomOptions.CheckUserOnJoin = true;
roomOptions.EmptyRoomTtl = 60000;
roomOptions.PlayerTtl = 60000;
roomOptions.IsOpen = true;
roomOptions.IsVisible = true;
this.OpCreateRoom (null, roomOptions, null);
I get my two clients connected and playing the game fine. Then I close my app, start my app and attempt to enter the game again; called with:
this.OpJoinRoom (roomName, actorNumber);
And I get a "Game Full" response. I close the app and wait a few moments more, start app and try to join room and I get a "Game does not exist." response.
Can anyone tell me what I'm doing wrong here? The roomName, actorNumber, room details, and game state are all being saved and retrieved from PlayFab cloud server.
Thanks.
0
Comments
-
Hi @duggo42,
Please first try finding a way to log calls to the webhooks from PlayFab's Cloud Script. You should focus onGameCreate
,GameLeave
andGameClose
and their respective arguments. Use Title Data temporarily if you want since PlayFab logs are not available from GameManager yet.
You should know from where you're getting those errors, Photon Servers or PlayFab Cloud Script. But until then, I'm gonna guess from my own experience.
The reason why you're getting two different errors for the same operation is the following :
- the first call toOpJoinRoom
happens beforeEmptyRoomTTL
timeout, which means that the Room is still in Photon Servers memory. Please make sure you're using the rightroomName
(I've noticed you're letting Photon Servers choose it for you) and that you're making a ReJoin and not a "first Join". Since you haveroomOptions.CheckUserOnJoin = true;
you can putactorNumber
to any value other than 0. Use a negative one (-1) to force the UserId check.
- the second call happens afterEmptyRoomTTL
timeout. The Room has been closed,RoomClosed
was triggered and according to you the State should be saved by now. So what happens is that when you callOpJoinRoom
,RoomCreated
withargs.Type == 'Load'
is called. Look into your Cloud Script and you will probably find the second error message ("Game does not exist") returned somewhere in there. If not found, then the problem is that you're not returning the Room State properly in the webhook response.
In order to help you, you should provide your Cloud Script code for webhooks.2 -
Great advice, I'll check into all this. Thanks again, JT.0