ExtensionRequest not working :(

Post here your questions about the HTML5 / JavaScript for SFS2X

Moderators: Lapo, Bax

User avatar
mete2221
Posts: 53
Joined: 30 Aug 2017, 17:01

ExtensionRequest not working :(

Postby mete2221 » 30 Aug 2017, 17:18

Image
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: ExtensionRequest not working :(

Postby Bax » 31 Aug 2017, 07:37

As you are using the latest API (with binary protocol support), the params objects must be passed as instances of SFSObject.
You should modify your code like this:

Code: Select all

var params = new SFS2X.SFSObject();
params.putInt("x", 1);
params.putInt("y", 1);

sfs.send(new SFS2X.ExtensionRequest("walk", params));
Paolo Bax
The SmartFoxServer Team
User avatar
mete2221
Posts: 53
Joined: 30 Aug 2017, 17:01

Re: ExtensionRequest not working :(

Postby mete2221 » 31 Aug 2017, 12:02

Thank you very much

Return to “SFS2X HTML5 / JavaScript API”

Who is online

Users browsing this forum: No registered users and 13 guests