Error Messages
-
Bosskafett
- Posts: 41
- Joined: 24 Jan 2012, 00:04
Error Messages
How can I configure Error Messages?
if(_global.is_rocketsnail == 1){
mc.snail._visible = true;
smartfox.setUserVariables({snl:1, init:false})
}
The Re-creator of Old Games ;D
mc.snail._visible = true;
smartfox.setUserVariables({snl:1, init:false})
}
The Re-creator of Old Games ;D
Re: Error Messages
Hello.
Which error messages are you referring to?
Which error messages are you referring to?
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
-
Bosskafett
- Posts: 41
- Joined: 24 Jan 2012, 00:04
Re: Error Messages
The Error Messages such as "User already logged in", "This Zone is currently not active!" and those sort of login errors. Thanks smartfox
if(_global.is_rocketsnail == 1){
mc.snail._visible = true;
smartfox.setUserVariables({snl:1, init:false})
}
The Re-creator of Old Games ;D
mc.snail._visible = true;
smartfox.setUserVariables({snl:1, init:false})
}
The Re-creator of Old Games ;D
Re: Error Messages
Well, I think you can't customize the on the server-side. But you can easily customize it on the client-side.
For example, when you get a Login Error saying "User already logged in" and you want to change that message, you can simply do the following:
But I will confirm tomorrow if it is possible or not to customize it on the server-side. I suggest you to check this topic, as it has the list of all the messages that aren't configurable through the config.xml file.
For example, when you get a Login Error saying "User already logged in" and you want to change that message, you can simply do the following:
Code: Select all
smartfox.onLogin = function (res:Object):Void
{
if (res.success){
trace("Successfully logged in as " + response.name)
}else{
var error = "";
if(res.error == "User already logged in") error = "My new custom message 1";
else if(res.error == "This Zone is currently not active!") error = "My new custom message 2";
trace("Zone login error; the following error occurred: " + error)
}Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
-
Bosskafett
- Posts: 41
- Joined: 24 Jan 2012, 00:04
Re: Error Messages
Thanks rjgtav, that worked great.
Thanks for taking the time to write out the code too.
cheers,
Jack
Thanks for taking the time to write out the code too.
cheers,
Jack
if(_global.is_rocketsnail == 1){
mc.snail._visible = true;
smartfox.setUserVariables({snl:1, init:false})
}
The Re-creator of Old Games ;D
mc.snail._visible = true;
smartfox.setUserVariables({snl:1, init:false})
}
The Re-creator of Old Games ;D