Forum Multiplayer listRooms errors

Discussion and help relating to the PlayerIO Multiplayer API.

listRooms errors

Postby Damir74 » February 22nd, 2010, 11:42 pm

http://playerio.com/admin/errorlog/over ... ultiplayer

trying get client.multiplayer.listRooms gives error
Error #1009: null in callback handler for Multiplayer.listRooms

I've use 'freespace' parameter:
-- in client.multiplayer.createJoinRoom it's OK
-- on ServerSideGameCode it's OK, I can change it and receive again to AS3
-- I've set it on "Search Settings" area in "MyGames"->"Multiplayer" overview page
-- but within client.multiplayer.listRooms it's hang game and gives error
Error #1009: null in callback handler for Multiplayer.listRooms

if I do remove from "Search Settings" area in "MyGames"->"Multiplayer" overview page
it will work ignoring listRooms code

please, can somebody show me full proper code how can I use listRooms function
:)
Damir74
 
Posts: 5
Joined: February 22nd, 2010, 11:46 am

Re: listRooms errors

Postby Benjaminsen » February 23rd, 2010, 10:43 am

Error #1009: null in callback handler for Multiplayer.listRooms indicates an error happened inside your callback handler.

Basically something wend wrong when we tried to call the callback method you have defined. Chances are you are having a code that can result in a null reference in your callback handler.
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: listRooms errors

Postby Damir74 » February 23rd, 2010, 5:46 pm

I'm beginner with player.io lib and flash
can you show me some sample with Multiplayer.listRooms
maybe I do mistake with function declare or something else


callback:Function (Default = null)
Method executed when the listRooms call executed successfully: function(rooms:Array<RoomInfo>):void{...}

what does it mean rooms:Array<RoomInfo> ?
Last edited by Damir74 on February 23rd, 2010, 5:50 pm, edited 1 time in total.
Damir74
 
Posts: 5
Joined: February 22nd, 2010, 11:46 am

Re: listRooms errors

Postby Benjaminsen » February 23rd, 2010, 5:49 pm

Damir74 wrote:I'm beginner with player.io lib and flash
can you show me some sample with Multiplayer.listRooms
maybe I do mistake with function declare or something else


There is some example code in the /Sample/Lobby.as file in the TicTacToe example, but I should probably sit down and write a few tutorials on how to use the different systems.

Can you go a bit more into detail on what you are trying to do?
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: listRooms errors

Postby Damir74 » February 23rd, 2010, 5:58 pm

I've also notice that putting "freespace" in Search Settings \ Search Column 1

and code inside AS3 :
myClient.multiplayer.listRooms(
"Filler3DMultiPlayer",
{freespace:"1"},
1,
0,
joinNewRoom,
createNewRoom
);

hangs somehow everything.... and generate above errors
Damir74
 
Posts: 5
Joined: February 22nd, 2010, 11:46 am

Re: listRooms errors

Postby Damir74 » February 23rd, 2010, 6:01 pm

Benjaminsen wrote:
Damir74 wrote:Can you go a bit more into detail on what you are trying to do?


I'm trying to make room for 1-to-1 game
each new player should authomaticaly in to free (where only one player waiting for 2nd) room

if all rooms are full (1st and 2nd player in game) system should generate and open new open game
Damir74
 
Posts: 5
Joined: February 22nd, 2010, 11:46 am

Re: listRooms errors

Postby Damir74 » February 23rd, 2010, 7:03 pm

it works now.... and seems ok
thank you for help
Damir74
 
Posts: 5
Joined: February 22nd, 2010, 11:46 am


Return to Multiplayer