getSpectatorCount() return always 0

You think you've found a bug? Please report it here.

Moderators: Lapo, Bax

Post Reply
Alex
Posts: 131
Joined: 03 Sep 2006, 09:15

getSpectatorCount() return always 0

Post by Alex »

Hi
I’m running the latest SFS version 1.5.1b and AS3 API and I have following problem:
A room is created with maxSpectators = 2 and uCount=false. When I join the room as spectator and trace sfs. getSpectatorCount in onJoinRoom() event I get 0 – which I expect to be 1 but when I trace sfs. playerId I get -1 which is correct. Also in onUserEnterRoom event of other users in the room when I trace getSpectatorCount I receive 0, but if iterate trough all users and check their playerId’s I receive correct results.
Also getUserCount is not working properly if I have one user and one spectator getUserCount return 2
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

thanks for reporting the problem.
We inspected the problem and there seem to be a bug lurking in there. It seems to be present in the AS 2 API as well and it's probably been there for a long time since it's pretty rare that you call that method, you usually rely on the room count updates which always return the right values.

We'll run a few more tests in the next days and tell you what we have found. The bug should be easy to fix and we'd be able to provide a patch very quickly.

Stay tuned
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

A patch was released! Please check this page and let us know if you encounter any problem --> http://forums.smartfoxserver.com/viewtopic.php?p=4808
Lapo
--
gotoAndPlay()
...addicted to flash games
Alex
Posts: 131
Joined: 03 Sep 2006, 09:15

Post by Alex »

Hi
Everything is fine now - it looks that you even fixed another bug involving accessing room vars of Boolean type.
10x
Post Reply