HELP!

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

Post Reply
IdanMasas
Posts: 11
Joined: 10 Jul 2016, 16:05

HELP!

Post 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?
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: HELP!

Post 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
Lapo
--
gotoAndPlay()
...addicted to flash games
IdanMasas
Posts: 11
Joined: 10 Jul 2016, 16:05

Re: HELP!

Post by IdanMasas »

Lapo wrote: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
Thanks for you answer!
Another question, There is a way to getRoomList() through an Extension? If yes, How?
User avatar
Rob
Posts: 53
Joined: 01 Jul 2017, 07:33

Re: HELP!

Post by Rob »

IdanMasas wrote:There is a way to getRoomList() through an Extension? If yes, How?
Yes. Read up on the Zone interface.
IdanMasas
Posts: 11
Joined: 10 Jul 2016, 16:05

Re: HELP!

Post 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? :(
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: HELP!

Post 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
Lapo
--
gotoAndPlay()
...addicted to flash games
IdanMasas
Posts: 11
Joined: 10 Jul 2016, 16:05

Re: HELP!

Post by IdanMasas »

Lapo wrote: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
[ 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.
IdanMasas
Posts: 11
Joined: 10 Jul 2016, 16:05

Re: HELP!

Post by IdanMasas »

Lapo wrote: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
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!
IdanMasas
Posts: 11
Joined: 10 Jul 2016, 16:05

Re: HELP!

Post by IdanMasas »

Lapo wrote: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
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:(
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: HELP!

Post 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
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply