Turn based: "Game Full" or "Does Not Exist" when attempting to rejoin.

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.

Comments

  • JohnTubeJohnTube mod
    edited August 2015
    Hi @duggo42,

    Please first try finding a way to log calls to the webhooks from PlayFab's Cloud Script. You should focus on GameCreate, GameLeave and GameClose 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 to OpJoinRoom happens before EmptyRoomTTL timeout, which means that the Room is still in Photon Servers memory. Please make sure you're using the right roomName (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 have roomOptions.CheckUserOnJoin = true; you can put actorNumber to any value other than 0. Use a negative one (-1) to force the UserId check.
    - the second call happens after EmptyRoomTTL 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 call OpJoinRoom, RoomCreated with args.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.
  • Great advice, I'll check into all this. Thanks again, JT.
Sign In or Register to comment.