Cannot get Room Variables JS API 1.1.0
Cannot get Room Variables JS API 1.1.0
I just update to latest API version, but can't get Room Variables. The code still work with previous API version.
Re: Cannot get Room Variables JS API 1.1.0
Can you please describe the steps to reproduce the issue?
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Re: Cannot get Room Variables JS API 1.1.0
Send Request:
Listen Response:
API V1.0.1 Console log
API V1.1.0 Console log
Code: Select all
this.smartfox.send(new SFS2X.Requests.System.JoinRoomRequest(room, password, roomIdToLeave, asSpect));
Listen Response:
Code: Select all
this.smartfox.addEventListener(SFS2X.SFSEvent.ROOM_JOIN, this.onRoomJoin, this);
p.onRoomJoin = function (event) {
console.log("onRoomJoin");
console.log(event.room.getVariable("betMoney")); // return undefined
}
API V1.0.1 Console log
API V1.1.0 Console log
Re: Cannot get Room Variables JS API 1.1.0
Thank you for reporting the issue. We fixed it and released version 1.1.1 of the API.
You can get the new version here: http://www.smartfoxserver.com/download/sfs2x#p=client
You can get the new version here: http://www.smartfoxserver.com/download/sfs2x#p=client
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Re: Cannot get Room Variables JS API 1.1.0
Thanks Bax.
I think i have found other bug. I use FindRoomRequest to filter my Rooms list, but when join to room the function getSpectatorCount() always return zero. But when reset FindRoomRequest this thing out, getSpectatorCount() correct.
Request:
Spectator Count:
I think i have found other bug. I use FindRoomRequest to filter my Rooms list, but when join to room the function getSpectatorCount() always return zero. But when reset FindRoomRequest this thing out, getSpectatorCount() correct.
Request:
Code: Select all
this.getSmartFox().addEventListener(SFS2X.SFSEvent.ROOM_FIND_RESULT, this.onRoomFindResult, this);
var exp = new SFS2X.Entities.Match.MatchExpression("bet", SFS2X.Entities.Match.NumberMatch.EQUALS, parseInt(bet));
this.getSmartFox().send(new SFS2X.Requests.System.FindRoomsRequest(exp, game));
Spectator Count:
Code: Select all
var roomSpectators = this.room.getSpectatorCount() + "/" + this.room.maxSpectators;
Re: Cannot get Room Variables JS API 1.1.0
darkera13 wrote:Thanks Bax.
I think i have found other bug. I use FindRoomRequest to filter my Rooms list, but when join to room the function getSpectatorCount() always return zero. But when reset FindRoomRequest this thing out, getSpectatorCount() correct.
Request:Code: Select all
this.getSmartFox().addEventListener(SFS2X.SFSEvent.ROOM_FIND_RESULT, this.onRoomFindResult, this);
var exp = new SFS2X.Entities.Match.MatchExpression("bet", SFS2X.Entities.Match.NumberMatch.EQUALS, parseInt(bet));
this.getSmartFox().send(new SFS2X.Requests.System.FindRoomsRequest(exp, game));
Spectator Count:Code: Select all
var roomSpectators = this.room.getSpectatorCount() + "/" + this.room.maxSpectators;
Can you please rephrase? Because I can't understand sorry.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Return to “SFS2X HTML5 / JavaScript API”
Who is online
Users browsing this forum: No registered users and 20 guests