Photon Unity Networking v1.101

Static Public Attributes | List of all members
Photon.Chat.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 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 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 that is 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...
 

Detailed Description

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

Member Data Documentation

◆ CustomAuthenticationFailed

const int Photon.Chat.ErrorCode.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.

◆ GameClosed

const int Photon.Chat.ErrorCode.GameClosed = 0x7FFF - 3
static

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

◆ GameDoesNotExist

const int Photon.Chat.ErrorCode.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 Photon.Chat.ErrorCode.GameFull = 0x7FFF - 2
static

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

◆ GameIdAlreadyExists

const int Photon.Chat.ErrorCode.GameIdAlreadyExists = 0x7FFF - 1
static

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

◆ InternalServerError

const int Photon.Chat.ErrorCode.InternalServerError = -1
static

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

◆ InvalidAuthentication

const int Photon.Chat.ErrorCode.InvalidAuthentication = 0x7FFF
static

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

◆ InvalidOperationCode

const int Photon.Chat.ErrorCode.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 Photon.Chat.ErrorCode.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://cloud.photonengine.com/dashboard

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.

◆ MaxCcuReached

const int Photon.Chat.ErrorCode.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 Photon.Chat.ErrorCode.NoRandomMatchFound = 0x7FFF - 7
static

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

◆ Ok

const int Photon.Chat.ErrorCode.Ok = 0
static

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

◆ OperationNotAllowedInCurrentState

const int Photon.Chat.ErrorCode.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. In PUN, wait until State is: JoinedLobby or ConnectedToMaster

◆ ServerFull

const int Photon.Chat.ErrorCode.ServerFull = 0x7FFF - 5
static

(32762) Not in use currently.

◆ UserBlocked

const int Photon.Chat.ErrorCode.UserBlocked = 0x7FFF - 6
static

(32761) Not in use currently.