What happens when I add a list of expected users counting more than the Max Player Per Room option?
Options
RoomOptions newRoomOptions = new RoomOptions(); newRoomOptions.PublishUserId = true; newRoomOptions.MaxPlayers = maxPlayersPerRoom; PhotonNetwork.CreateRoom(gameRoomName, newRoomOptions, TypedLobby.Default, friendIDs);
what if friendIDs.length is greater than maxPlayersPerRoom? Do user get to create the room or an error is formed?
0
Best Answer
-
Hi @CreativeMango,
Thank you for choosing Photon!
Well doesn't hurt to test/try it.
The room creation will fail and you will get an error response.
If you implement the OnCreateRoomFailed callback you will get an error code: InvalidOperation = -2 and error message: "Reserved slots count is bigger then max player value".1
Answers
-
Hi @CreativeMango,
Thank you for choosing Photon!
Well doesn't hurt to test/try it.
The room creation will fail and you will get an error response.
If you implement the OnCreateRoomFailed callback you will get an error code: InvalidOperation = -2 and error message: "Reserved slots count is bigger then max player value".1 -
Thanks a lot. Tested it with Facebook on editor but somehow that didn't work. Later I found that it's due to Facebook SDK. I did a lot of study regarding this but found the reason afterward. Sorry for being too much eager to know
Thought of a solution for this though. Will test if.
Thank you very much0 -
by the way, really becoming a fan of Photon
!st tried with playfab, but now integrated with firebase features and facebook. works like a charm0