Forum ActionScript 3.0 listRooms bug?

Problems and discussions relating to ActionScript 3.0 here.

listRooms bug?

Postby Tsuken » April 20th, 2010, 12:45 pm

Hi, I was just trying out stuff with the lobby for the tictactoe example.
I added gameType as a variable in the createroom function and also added it on the admin panel under "Search Settings"
The problem is, if gameType is a number, it's returned as null in the listRooms function. For example:

Code: Select all
            {name:name, gameType:1},

If you later want a list of all existing games with gameType 1, you would use:
Code: Select all
_client.multiplayer.listRooms(_serverType, {gameType:1}, 50, 0, function(rooms:Array){
         }, function(e:PlayerIOError){
            trace("Unable to list rooms", e)

But it will return an empty list, because gameType was stored as null instead of 1. I know this because it says it's null when I ask for the complete list (so without stating a search variable).

However, if you use gameType:"1" (so a string) in both functions, it all works fine. So in other words, numbers don't work.
Posts: 41
Joined: January 26th, 2010, 7:54 pm

Re: listRooms bug?

Postby Benjaminsen » August 3rd, 2010, 10:25 am

This is fixed in the next release.
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Return to ActionScript 3.0