SFSErrorCodes documentation appears incorrect

Post here your questions about the HTML5 / JavaScript for SFS2X

Moderators: Lapo, Bax

User avatar
marsoups
Posts: 167
Joined: 14 Apr 2008, 03:30

SFSErrorCodes documentation appears incorrect

Postby marsoups » 10 Apr 2018, 21:13

Using the examples from the documentation :
http://docs2x.smartfoxserver.com/api-docs/jsdoc/client/SFSErrorCodes.html results in an error :

Code: Select all

function someMethod()
{
   SFS2X.ErrorCodes.setErrorMessage(13, "Le Groupe demandé n'est pas disponible - Salle: {0}; Groupe: {1}");
}


Code: Select all

TypeError: Cannot read property 'setErrorMessage' of undefined


I tried setting it to look like this :

Code: Select all

SFS2X.SFSErrorCodes.setErrorMessage(200, "Token {0} has expired!");
however, the returned error message doesn't translate accordingly and it just returns a blank message. Am I doing something wrong ?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: SFSErrorCodes documentation appears incorrect

Postby Lapo » 11 Apr 2018, 07:05

Hi,
thanks for reporting. We'll fix it asap.

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: SFSErrorCodes documentation appears incorrect

Postby Bax » 11 Apr 2018, 08:37

Error fixed. Please download API v1.7.10.
We also fixed the documentation error; in fact you should use:

Code: Select all

function someMethod()
{
   SFS2X.SFSErrorCodes.setErrorMessage(13, "Le Groupe demandé n'est pas disponible - Salle: {0}; Groupe: {1}");
}
Paolo Bax
The SmartFoxServer Team

Return to “SFS2X HTML5 / JavaScript API”

Who is online

Users browsing this forum: No registered users and 14 guests