Where is ReturnCode Full List?
The whole answer can be found below.
Try Our
Documentation
Please check if you can find an answer in our extensive documentation on PUN.
Join Us
on Discord
Meet and talk to our staff and the entire Photon-Community via Discord.
Read More on
Stack Overflow
Find more information on Stack Overflow (for Circle members only).
Where is ReturnCode Full List?
Yonghani
2020-09-30 09:49:13
I would like to know a list of all return codes for the following functions.
- OnCreateRoomFailed
- OnJoinRoomFailed
- OnJoinRandomFailed
for example,
I would like to know the code of the following situation.
- Failed to find room.
- Failed because the room is full.
- so on...
Where can I see all the list of return codes?
Comments
Hi @Yonghani,
Here is a list of error codes per operation/callback (could be updated as I might have missed some error codes):
You can find more info by looking at the XML documentation in the code, see ErrorCode class.
Also the error response and respective callback contain error message with more details.
Common errors:
- OperationNotAllowedInCurrentState = -3 (rare)
- InvalidOperation = -2 (should not happen in PUN)
- InternalServerError = -1 (rare)
CreateRoom operation / OnCreateRoomFailed:
- ServerFull = 32762 (rare)
- GameIdAlreadyExists = 32766
- PluginReportedError = 32752 (in case you use server plugin)
- PluginMismatch = 32751 (in case you use server plugin)
- SlotError = 32742 (in case you use ExpectedUsers)
JoinRoom operation / OnJoinRoomFailed:
- GameFull = 32765
- GameClosed = 32764
- GameDoesNotExist = 32758
- PluginReportedError = 32752 (in case you use server plugin)
- PluginMismatch = 32751 (in case you use server plugin)
- JoinFailedPeerAlreadyJoined = 32750
- JoinFailedFoundInactiveJoiner = 32749
- JoinFailedWithRejoinerNotFound = 32748 (for Rejoin)
- JoinFailedFoundExcludedUserId = 32747 (I think not used currently)
- JoinFailedFoundActiveJoiner = 32746
- SlotError = 32742 (in case you use ExpectedUsers)
JoinRandomRoom operation / OnJoinRandomFailed:
- NoRandomMatchFound = 32760
Thank you for your kind explanation.
Back to top