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

Detailed Description

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

Member Data Documentation

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 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 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 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://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.

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 ConnectedToMaster

const int ServerFull = 0x7FFF - 5

(32762) Not in use currently.

const int UserBlocked = 0x7FFF - 6

(32761) Not in use currently.