Photon Unity Networking 2  v2.1
English | 日本語 | 한국
Public Attributes | List of all members
ErrorCode Class Reference

ErrorCode defines the default codes associated with Photon client/server communication. More...

Public Attributes

const int Ok = 0
 (0) is always "OK", anything else an error or specific situation. More...
 
const int OperationNotAllowedInCurrentState = -3
 (-3) Operation can't be executed yet (e.g. OpJoin can't be called before being authenticated, RaiseEvent cant be used before getting into a room). More...
 
const int InvalidOperationCode = -2
 (-2) The operation you called is not implemented on the server (application) you connect to. Make sure you run the fitting applications. More...
 
const int InvalidOperation = -2
 (-2) The operation you called could not be executed on the server. More...
 
const int InternalServerError = -1
 (-1) Something went wrong in the server. Try to reproduce and contact Exit Games. More...
 
const int InvalidAuthentication = 0x7FFF
 (32767) Authentication failed. Possible cause: AppId is unknown to Photon (in cloud service). More...
 
const int GameIdAlreadyExists = 0x7FFF - 1
 (32766) GameId (name) already in use (can't create another). Change name. More...
 
const int GameFull = 0x7FFF - 2
 (32765) Game is full. This rarely happens when some player joined the room before your join completed. More...
 
const int GameClosed = 0x7FFF - 3
 (32764) Game is closed and can't be joined. Join another game. More...
 
const int AlreadyMatched = 0x7FFF - 4
 
const int ServerFull = 0x7FFF - 5
 (32762) Not in use currently. More...
 
const int UserBlocked = 0x7FFF - 6
 (32761) Not in use currently. More...
 
const int NoRandomMatchFound = 0x7FFF - 7
 (32760) Random matchmaking only succeeds if a room exists thats neither closed nor full. Repeat in a few seconds or create a new room. More...
 
const int GameDoesNotExist = 0x7FFF - 9
 (32758) Join can fail if the room (name) is not existing (anymore). This can happen when players leave while you join. More...
 
const int MaxCcuReached = 0x7FFF - 10
 (32757) Authorization on the Photon Cloud failed becaus the concurrent users (CCU) limit of the app's subscription is reached. More...
 
const int InvalidRegion = 0x7FFF - 11
 (32756) Authorization on the Photon Cloud failed because the app's subscription does not allow to use a particular region's server. More...
 
const int CustomAuthenticationFailed = 0x7FFF - 12
 (32755) Custom Authentication of the user failed due to setup reasons (see Cloud Dashboard) or the provided user data (like username or token). Check error message for details. More...
 
const int AuthenticationTicketExpired = 0x7FF1
 (32753) The Authentication ticket expired. Usually, this is refreshed behind the scenes. Connect (and authorize) again. More...
 
const int PluginReportedError = 0x7FFF - 15
 (32752) A server-side plugin (or webhook) failed to execute and reported an error. Check the OperationResponse.DebugMessage. More...
 
const int PluginMismatch = 0x7FFF - 16
 (32751) CreateGame/JoinGame/Join operation fails if expected plugin does not correspond to loaded one. More...
 
const int JoinFailedPeerAlreadyJoined = 32750
 (32750) for join requests. Indicates the current peer already called join and is joined to the room. More...
 
const int JoinFailedFoundInactiveJoiner = 32749
 (32749) for join requests. Indicates the list of InactiveActors already contains an actor with the requested ActorNr or UserId. More...
 
const int JoinFailedWithRejoinerNotFound = 32748
 (32748) for join requests. Indicates the list of Actors (active and inactive) did not contain an actor with the requested ActorNr or UserId. More...
 
const int JoinFailedFoundExcludedUserId = 32747
 (32747) for join requests. Note: for future use - Indicates the requested UserId was found in the ExcludedList. More...
 
const int JoinFailedFoundActiveJoiner = 32746
 (32746) for join requests. Indicates the list of ActiveActors already contains an actor with the requested ActorNr or UserId. More...
 
const int HttpLimitReached = 32745
 (32745) for SetProerties and Raisevent (if flag HttpForward is true) requests. Indicates the maximum allowd http requests per minute was reached. More...
 
const int ExternalHttpCallFailed = 32744
 (32744) for WebRpc requests. Indicates the the call to the external service failed. More...
 
const int SlotError = 32742
 (32742) Server error during matchmaking with slot reservation. E.g. the reserved slots can not exceed MaxPlayers. More...
 
const int InvalidEncryptionParameters = 32741
 (32741) Server will react with this error if invalid encryption parameters provided by token More...
 

Detailed Description

ErrorCode defines the default codes associated with Photon client/server communication.

Member Data Documentation

const int AuthenticationTicketExpired = 0x7FF1

(32753) The Authentication ticket expired. Usually, this is refreshed behind the scenes. Connect (and authorize) again.

const int CustomAuthenticationFailed = 0x7FFF - 12

(32755) Custom Authentication of the user failed due to setup reasons (see Cloud Dashboard) or the provided user data (like username or token). Check error message for details.

const int ExternalHttpCallFailed = 32744

(32744) for WebRpc requests. Indicates the the call to the external service failed.

const int GameClosed = 0x7FFF - 3

(32764) Game is closed and can't be joined. Join another game.

const int GameDoesNotExist = 0x7FFF - 9

(32758) Join can fail if the room (name) is not existing (anymore). This can happen when players leave while you join.

const int GameFull = 0x7FFF - 2

(32765) Game is full. This rarely happens when some player joined the room before your join completed.

const int GameIdAlreadyExists = 0x7FFF - 1

(32766) GameId (name) already in use (can't create another). Change name.

const int HttpLimitReached = 32745

(32745) for SetProerties and Raisevent (if flag HttpForward is true) requests. Indicates the maximum allowd http requests per minute was reached.

const int InternalServerError = -1

(-1) Something went wrong in the server. Try to reproduce and contact Exit Games.

const int InvalidAuthentication = 0x7FFF

(32767) Authentication failed. Possible cause: AppId is unknown to Photon (in cloud service).

const int InvalidEncryptionParameters = 32741

(32741) Server will react with this error if invalid encryption parameters provided by token

const int InvalidOperation = -2

(-2) The operation you called could not be executed on the server.

Make sure you are connected to the server you expect.

This code is used in several cases: The arguments/parameters of the operation might be out of range, missing entirely or conflicting. The operation you called is not implemented on the server (application). Server-side plugins affect the available operations.

const int InvalidOperationCode = -2

(-2) The operation you called is not implemented on the server (application) you connect to. Make sure you run the fitting applications.

const int InvalidRegion = 0x7FFF - 11

(32756) Authorization on the Photon Cloud failed because the app's subscription does not allow to use a particular region's server.

Some subscription plans for the Photon Cloud are region-bound. Servers of other regions can't be used then. Check your master server address and compare it with your Photon Cloud Dashboard's info. https://dashboard.photonengine.com

OpAuthorize is part of connection workflow but only on the Photon Cloud, this error can happen. Self-hosted Photon servers with a CCU limited license won't let a client connect at all.

const int JoinFailedFoundActiveJoiner = 32746

(32746) for join requests. Indicates the list of ActiveActors already contains an actor with the requested ActorNr or UserId.

const int JoinFailedFoundExcludedUserId = 32747

(32747) for join requests. Note: for future use - Indicates the requested UserId was found in the ExcludedList.

const int JoinFailedFoundInactiveJoiner = 32749

(32749) for join requests. Indicates the list of InactiveActors already contains an actor with the requested ActorNr or UserId.

const int JoinFailedPeerAlreadyJoined = 32750

(32750) for join requests. Indicates the current peer already called join and is joined to the room.

const int JoinFailedWithRejoinerNotFound = 32748

(32748) for join requests. Indicates the list of Actors (active and inactive) did not contain an actor with the requested ActorNr or UserId.

const int MaxCcuReached = 0x7FFF - 10

(32757) Authorization on the Photon Cloud failed becaus the concurrent users (CCU) limit of the app's subscription is reached.

Unless you have a plan with "CCU Burst", clients might fail the authentication step during connect. Affected client are unable to call operations. Please note that players who end a game and return to the master server will disconnect and re-connect, which means that they just played and are rejected in the next minute / re-connect. This is a temporary measure. Once the CCU is below the limit, players will be able to connect an play again.

OpAuthorize is part of connection workflow but only on the Photon Cloud, this error can happen. Self-hosted Photon servers with a CCU limited license won't let a client connect at all.

const int NoRandomMatchFound = 0x7FFF - 7

(32760) Random matchmaking only succeeds if a room exists thats neither closed nor full. Repeat in a few seconds or create a new room.

const int Ok = 0

(0) is always "OK", anything else an error or specific situation.

const int OperationNotAllowedInCurrentState = -3

(-3) Operation can't be executed yet (e.g. OpJoin can't be called before being authenticated, RaiseEvent cant be used before getting into a room).

Before you call any operations on the Cloud servers, the automated client workflow must complete its authorization. In PUN, wait until State is: JoinedLobby or ConnectedToMasterserver

const int PluginMismatch = 0x7FFF - 16

(32751) CreateGame/JoinGame/Join operation fails if expected plugin does not correspond to loaded one.

const int PluginReportedError = 0x7FFF - 15

(32752) A server-side plugin (or webhook) failed to execute and reported an error. Check the OperationResponse.DebugMessage.

const int ServerFull = 0x7FFF - 5

(32762) Not in use currently.

const int SlotError = 32742

(32742) Server error during matchmaking with slot reservation. E.g. the reserved slots can not exceed MaxPlayers.

const int UserBlocked = 0x7FFF - 6

(32761) Not in use currently.