Problem public message room

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

TwineApps
Posts: 80
Joined: 10 Nov 2016, 18:39

Problem public message room

Postby TwineApps » 02 May 2017, 11:34

Hi,

In my game you can access by email or with username, there is a chat, to send messages to the room I do this:

Code: Select all

Sfs.Send (new Sfs2X.Requests.PublicMessageRequest (msgField.text));


If the user login with the email, in the sender name, give me a user's email, how can i pass it as a nickname?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Problem public message room

Postby Lapo » 02 May 2017, 13:27

Hi,
you will need to resolve this at login time.
There is a way to assign a user's name regardless of the "name" parameter passed in the Login request.

Take a look at this tutorial:
http://smartfoxserver.com/blog/how-to-c ... tom-login/

In particular section #4: "Change the user name at login time"

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
TwineApps
Posts: 80
Joined: 10 Nov 2016, 18:39

Re: Problem public message room

Postby TwineApps » 09 May 2017, 19:01

Work it!!

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 71 guests