Page 1 of 1

Uppercase

Posted: 11 Nov 2013, 15:24
by travis
Hi,

Sorry for my ignorance, anybody know how to change guest_17, guest_18 to Guest_17, Guest_18 when logging in.

TIA

Re: Uppercase

Posted: 13 Nov 2013, 08:37
by Lapo
Hi,
guest names are auto-generated by the server when people don't provide their user names. They can't be changed in SFS PRO.
However you can create your own Extension code that checks the login name provided by the user and if it's empty generates a custom name for him/her.

Cheers

Re: Uppercase

Posted: 13 Nov 2013, 12:37
by travis
Hi,

Thanks for responding, i was hoping it might be as easy as changing the g to G in the as files, but i got round it with my own login section


// *** If blank create own
Randy = Math.floor(Math.random() * 100000) + 1;
TheLogger = "Guest_" + Randy;

// *** Then log in
smartfox.login(zone,TheLogger,Pass.text);

Re: Uppercase

Posted: 14 Nov 2013, 01:45
by rjgtav
Hi,

The problem with creating the names on the client-side is that it could generate a name that is already logged in the Zone.
I'd really suggest you to follow Lapo's recomendation, as on the server-side you can check whether or not a name already exists much easier than with your own implementation.

Cheers

Re: Uppercase

Posted: 14 Nov 2013, 13:58
by travis
Hi,

Its so random that the likely hood of being the same is remote, however, if it is the same then they just get a username already taken message.
Then press log in again.

Re: Uppercase

Posted: 16 Nov 2013, 02:25
by rjgtav
Hmm.. I think displaying that error message to a player that is just entering as a Guest may sound a bit confusing to the user.
Maybe you could automate the system so that it retries to login with a different name in case it is a Guest login and the username already exists?