Photon Unity Networking 2 2.45

Static Public Attributes | List of all members
ErrorCode Class Reference

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

Static 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) All servers are busy. This is a temporary issue and the game logic should try again after a brief wait time. 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 because 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 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 SetProperties and RaiseEvent (if flag HttpForward is true) requests. Indicates the maximum allowed 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 OperationLimitReached = 32743
 (32743) for operations with defined limits (as in calls per second, content count or size). 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

◆ AuthenticationTicketExpired

const int AuthenticationTicketExpired = 0x7FF1
static

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

◆ CustomAuthenticationFailed

const int CustomAuthenticationFailed = 0x7FFF - 12
static

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

◆ ExternalHttpCallFailed

const int ExternalHttpCallFailed = 32744
static

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

◆ GameClosed

const int GameClosed = 0x7FFF - 3
static

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

◆ GameDoesNotExist

const int GameDoesNotExist = 0x7FFF - 9
static

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

◆ GameFull

const int GameFull = 0x7FFF - 2
static

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

◆ GameIdAlreadyExists

const int GameIdAlreadyExists = 0x7FFF - 1
static

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

◆ HttpLimitReached

const int HttpLimitReached = 32745
static

(32745) for SetProperties and RaiseEvent (if flag HttpForward is true) requests. Indicates the maximum allowed http requests per minute was reached.

◆ InternalServerError

const int InternalServerError = -1
static

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

◆ InvalidAuthentication

const int InvalidAuthentication = 0x7FFF
static

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

◆ InvalidEncryptionParameters

const int InvalidEncryptionParameters = 32741
static

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

◆ InvalidOperation

const int InvalidOperation = -2
static

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

◆ InvalidOperationCode

const int InvalidOperationCode = -2
static

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

◆ InvalidRegion

const int InvalidRegion = 0x7FFF - 11
static

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

◆ JoinFailedFoundActiveJoiner

const int JoinFailedFoundActiveJoiner = 32746
static

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

◆ JoinFailedFoundExcludedUserId

const int JoinFailedFoundExcludedUserId = 32747
static

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

◆ JoinFailedFoundInactiveJoiner

const int JoinFailedFoundInactiveJoiner = 32749
static

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

◆ JoinFailedPeerAlreadyJoined

const int JoinFailedPeerAlreadyJoined = 32750
static

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

◆ JoinFailedWithRejoinerNotFound

const int JoinFailedWithRejoinerNotFound = 32748
static

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

◆ MaxCcuReached

const int MaxCcuReached = 0x7FFF - 10
static

(32757) Authorization on the Photon Cloud failed because 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.

◆ NoRandomMatchFound

const int NoRandomMatchFound = 0x7FFF - 7
static

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

◆ Ok

const int Ok = 0
static

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

◆ OperationLimitReached

const int OperationLimitReached = 32743
static

(32743) for operations with defined limits (as in calls per second, content count or size).

◆ OperationNotAllowedInCurrentState

const int OperationNotAllowedInCurrentState = -3
static

(-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. Wait until State is: JoinedLobby or ConnectedToMasterServer

◆ PluginMismatch

const int PluginMismatch = 0x7FFF - 16
static

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

◆ PluginReportedError

const int PluginReportedError = 0x7FFF - 15
static

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

A typical case is when a plugin prevents a user from creating or joining a room. If this is prohibited, that reports to the client as a plugin error.
Same for WebHooks.

◆ ServerFull

const int ServerFull = 0x7FFF - 5
static

(32762) All servers are busy. This is a temporary issue and the game logic should try again after a brief wait time.

This error may happen for all operations that create rooms. The operation response will contain this error code.

This error is very unlikely to happen as we monitor load on all servers and add them on demand. However, it's good to be prepared for a shortage of machines or surge in CCUs.

◆ SlotError

const int SlotError = 32742
static

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

◆ UserBlocked

const int UserBlocked = 0x7FFF - 6
static

(32761) Not in use currently.