HELP!

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

Moderators: Lapo, Bax

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

HELP!

Postby IdanMasas » 21 Jul 2020, 18:31

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: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: HELP!

Postby Lapo » 23 Jul 2020, 08:07

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!

Postby IdanMasas » 23 Jul 2020, 14:17

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!

Postby Rob » 24 Jul 2020, 10:26

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!

Postby IdanMasas » 24 Jul 2020, 11:24

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: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: HELP!

Postby Lapo » 24 Jul 2020, 12:22

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!

Postby IdanMasas » 24 Jul 2020, 13:52

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!

Postby IdanMasas » 24 Jul 2020, 14:07

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: viewtopic.php?f=4&t=22714
Thank you so much for your quick responds!
IdanMasas
Posts: 11
Joined: 10 Jul 2016, 16:05

Re: HELP!

Postby IdanMasas » 25 Jul 2020, 16:58

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: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: HELP!

Postby Lapo » 25 Jul 2020, 17:53

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

Return to “Server Side Extension Development”

Who is online

Users browsing this forum: No registered users and 21 guests