Search found 16 matches
- 13 Dec 2016, 08:36
- Forum: SFS2X Questions
- Topic: Sender is not a User Why?
- Replies: 8
- Views: 10779
Re: Sender is not a User Why?
. In client, add a log listener: smartFox.AddLogListener(LogLevel.DEBUG, OnDebugMessage); And add this function to show log: private static void OnDebugMessage(BaseEvent evt) { string message = (string)evt.Params["message"]; Debug.Log("[SFS DEBUG] " + message); } private static ...
- 06 Dec 2016, 09:30
- Forum: SFS2X Questions
- Topic: Custom login with facebook
- Replies: 3
- Views: 5735
Re: Custom login with facebook
Your solution looks good. I will try it now.
- 06 Dec 2016, 09:25
- Forum: SFS2X Questions
- Topic: Custom login with facebook
- Replies: 3
- Views: 5735
Re: Custom login with facebook
Thank for reply. Only my PHP server contact with facebook. Step 1 to obtain token, step 2 to obtain email (this part comes from one of my web project :D). My question is how can I log an user in if he does not actually send a "SFS login request". I mean totally customised. SFS will get ema...
- 06 Dec 2016, 07:54
- Forum: SFS2X Questions
- Topic: Sender is not a User Why?
- Replies: 8
- Views: 10779
Re: Sender is not a User Why?
zynbasil wrote: { Id: 117643, Type: DEFAULT, Logged: No, IP: 172.31.46.150:56095 }
Not logged in. It's still a session, not an user yet.
- 06 Dec 2016, 04:25
- Forum: SFS2X Questions
- Topic: Custom login with facebook
- Replies: 3
- Views: 5735
Custom login with facebook
I want to implement facebook login with my app. Currently I'm doing: 1. Client send login request to PHP server, PHP server return token to client. 2. Client send token to SFS, SFS send token to PHP server to obtain email and name. 3. After got email, SFS check if user with that email already exist,...
- 24 Nov 2016, 04:23
- Forum: SFS2X Questions
- Topic: How to send room user list to client?
- Replies: 2
- Views: 4652
Re: How to send room user list to client?
How to send a single user object to client?
- 24 Nov 2016, 03:27
- Forum: SFS2X Questions
- Topic: How to send room user list to client?
- Replies: 2
- Views: 4652
How to send room user list to client?
How can I send a room's user list to each user in that room?
- 22 Nov 2016, 04:32
- Forum: SFS2X Questions
- Topic: Call SFSServer instance
- Replies: 3
- Views: 5246
Re: Call SFSServer instance
Thanks. One more question: Which ext did getParentExtension() return when I have both zone ext and room ext?
- 21 Nov 2016, 10:58
- Forum: SFS2X Questions
- Topic: Call SFSServer instance
- Replies: 3
- Views: 5246
Call SFSServer instance
Why i can't do this? OBExtension.java SmartFoxServer sfs; ISFSApi sfsapi; Zone zone; @Override public void init() { zone = this.getParentZone(); sfs = SmartFoxServer.getInstance(); sfsapi = sfs.getAPIManager().getSFSApi(); } public Zone getZone() { return zone; } public SmartFoxServer getServer() { ...
- 21 Nov 2016, 04:48
- Forum: SFS2X Questions
- Topic: Set uservariable immediately after login
- Replies: 1
- Views: 3596
Set uservariable immediately after login
Is there any possible way to set uservariable immediately after he login? This variable is a login param which sent along with username and password in login request.
I can't do it in USER_LOGIN event because it seems like the user hasn't been created at that time.
I can't do it in USER_LOGIN event because it seems like the user hasn't been created at that time.
- 17 Nov 2016, 09:51
- Forum: SFS2X Questions
- Topic: Unable to create room variables
- Replies: 8
- Views: 9698
Re: Unable to create room variables
Bax wrote:Make sure you pass at least 2 to the CreateRoomSettings.setMaxVariablesAllowed method.
Thanks. It worked. But i'm so confused. I have configured max room variables in Zone configuration.
- 17 Nov 2016, 09:43
- Forum: SFS2X Questions
- Topic: Unable to create room variables
- Replies: 8
- Views: 9698
Re: Unable to create room variables
Zone.createRoom method is shown in the API documentation, but it has no description. This means you are not supposed to use it (unfortunately javadoc doesn't allow us to "hide" methods in the doc). Go with the SFSApi.createRoom method. RoomVariable maxRank = new SFSRoomVariable("maxR...
- 17 Nov 2016, 09:38
- Forum: SFS2X Questions
- Topic: Unable to create room variables
- Replies: 8
- Views: 9698
Re: Unable to create room variables
You are creating the Room in the wrong way. ALWAYS use the SFSApi class to interact with the server! In this case you have to use the SFSApi.createRoom method, followed by the SFSApi.joinRoom to add users to it. Always check the server API doc : if a method or property is not documented, then you s...
- 17 Nov 2016, 09:25
- Forum: SFS2X Questions
- Topic: Unable to create room variables
- Replies: 8
- Views: 9698
Re: Unable to create room variables
I'm sorry but which part am I wrong? Zone.createRoom() is documented in the documentation. The server log said: 16:22:54,841 WARN [SFSWorker:Ext:1] entities.SFSRoom - Room Variables are disabled: [ Room: 0e8d84f1714b4827976c8abd686bf4ca, Id: 2, Group: Battlefield, isGame: true ] I will try to use SF...
- 17 Nov 2016, 08:01
- Forum: SFS2X Questions
- Topic: Unable to create room variables
- Replies: 8
- Views: 9698
Unable to create room variables
Below is my code to create a room with 2 default variable. But it's not working. Room is created but no variable at runtime monitor. String uuid = UUID.randomUUID().toString().replaceAll("-", ""); try { RoomVariable maxRank = new SFSRoomVariable("maxRank", 0); RoomVaria...