Page 1 of 1
HELP!
Posted: 21 Jul 2020, 18:31
by IdanMasas
Hey,
How can I check through an handleRequest() if a user is trying to login?
I've tried this: "if (cmd == "login") { // DO SOMETHING }" but this is doesn't work.
Basically I want to send a response to the client from the server when user is trying to login.
Help?
Re: HELP!
Posted: 23 Jul 2020, 08:07
by Lapo
In order to handle a login you need to user server events.
Please make sure to read this tutorial:
https://www.smartfoxserver.com/docs/1x/ ... /index.htm
Cheers
Re: HELP!
Posted: 23 Jul 2020, 14:17
by IdanMasas
Thanks for you answer!
Another question, There is a way to getRoomList() through an Extension? If yes, How?
Re: HELP!
Posted: 24 Jul 2020, 10:26
by Rob
IdanMasas wrote:There is a way to getRoomList() through an Extension? If yes, How?
Yes. Read up on the
Zone interface.
Re: HELP!
Posted: 24 Jul 2020, 11:24
by IdanMasas
Rob wrote:IdanMasas wrote:There is a way to getRoomList() through an Extension? If yes, How?
Yes. Read up on the
Zone interface.
This is returning me this error: "Error in extension [ loggedIn.as ]: ReferenceError: "getRoomList" is not defined."
Any help?

Re: HELP!
Posted: 24 Jul 2020, 12:22
by Lapo
The link that was posted by Rob is incorrect. That's for SmartFoxServer 2X but you're using SFS1.x
You should stick with the SFS1.x documentation:
https://www.smartfoxserver.com/docs/1x/
Server side API:
https://www.smartfoxserver.com/docs/1x/ ... /index.htm
cheers
Re: HELP!
Posted: 24 Jul 2020, 13:52
by IdanMasas
[ WARNING ] > InternalError: Can't find method it.gotoandplay.smartfoxserver.extensions.ExtensionHelper.joinRoom(sun.nio.ch.SocketChannelImpl,number,number,boolean,string,boolean,boolean).
This is what I'm getting now. I'm so confused idk why is it not working.
Re: HELP!
Posted: 24 Jul 2020, 14:07
by IdanMasas
By the way, Please look at my new post i just posted:
https://forums.smartfoxserver.com/viewt ... =4&t=22714
Thank you so much for your quick responds!
Re: HELP!
Posted: 25 Jul 2020, 16:58
by IdanMasas
Hey, I don't want to interrupt you but I have to understand how to do it.
Look at my newest post, I've sent it to you before, PLEASE help me Lapo.
I need to make the server send the exact response as I showed there.
Thanks:(
Re: HELP!
Posted: 25 Jul 2020, 17:53
by Lapo
IdanMasas wrote:
[ WARNING ] > InternalError: Can't find method it.gotoandplay.smartfoxserver.extensions.ExtensionHelper.joinRoom(sun.nio.ch.SocketChannelImpl,number,number,boolean,string,boolean,boolean).
It seems like this could be caused by Extension code.
Also is there a complete stack trace of the error?
Thanks