Where is ReturnCode Full List?

The whole answer can be found below.

Please note: The Photon forum is closed permanently. After many dedicated years of service we have made the decision to retire our forum and switch to read-only: we've saved the best to last! And we offer you support through these channels:

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).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

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

JohnTube
2020-09-30 10:46:54

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

Yonghani
2020-09-30 11:30:50

Thank you for your kind explanation.

Back to top