The room list is empty!

Everything about the SmartFoxBits UI Components for SmartFoxServer 1.x. Post your questions, suggestions and bug reports.

Moderators: Lapo, Bax

Post Reply
kenjii
Posts: 27
Joined: 06 Mar 2009, 12:33
Location: france

The room list is empty!

Post by kenjii »

hello all it's me again...

i have this error :

Internal error:
The room list is empty!
The client API cannot function properly until the room list is populated.
Please consult the documentation for more infos.

but all seem to be ok when i connect from other client i get them in the list and them can see my username...

Does that will give me problem later or i have something to do now ?
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

You are trying to join a room before requesting the roomlist.
Paolo Bax
The SmartFoxServer Team
kenjii
Posts: 27
Joined: 06 Mar 2009, 12:33
Location: france

Post by kenjii »

thanks it's ok now :)
nukerito
Posts: 3
Joined: 31 Aug 2009, 16:34

Get the same Error

Post by nukerito »

i call the getRoomlList before creating or joining but i get the same error
my code:

roomObj = new Object();
roomObj.name = "The Cave";
roomObj.isGame = true;
roomObj.isTemp = true;
roomObj.maxUsers = 15;
var variables:Array = new Array();
variables.push( { name:"ogres", val:5, priv:true } );
variables.push( { name:"skeletons", val:4 } );
roomObj.vars = variables;
smartFox.getRoomList();
smartFox.createRoom(roomObj);

By the way.. im using SmartFox Server Pro 1.6.6 and i'm reading this documentation:
http://www.smartfoxserver.com/docs/docP ... index.html
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

You can't make the

Code: Select all

smartFox.getRoomList(); 
smartFox.createRoom(roomObj); 
calls in a row. The getRoomList method is asynchronous: you have to wait for the onRoomListUpdate event before doing any other call.
Paolo Bax
The SmartFoxServer Team
t3hh00d
Posts: 1
Joined: 11 Nov 2009, 00:05

Post by t3hh00d »

This solution worked for me. It may not be of much consequence, but it would be really helpful if the errors thrown gave you information about the asynchronous dependencies of some of these calls.

Seems a little odd that it took me a good portion of my day to figure out that I was calling things out of sync. Either way, thanks!! Take care.
Post Reply