Cannot create Room dynamically
Posted: 23 May 2012, 13:34
Hi,
I am trying to create Room dynamically. My idea is to create a game Room for every two players connected previously by invitations. However, when i try to create a room this way:
Niether onGameRoomCreated or onGameRoomCreationError event listener gets fired and i don't know what could be the problem? I would appreciate any help i can get on this?
I checked in andmin interface that room name is ok and although the user that's creating this room is with Guest privillege i checked in Smartfoxserver 2X Admin interface that he has room creation privillege but maybe i am missing something? It's strange that i get no error or any notice?
Thanks in advance!
I am trying to create Room dynamically. My idea is to create a game Room for every two players connected previously by invitations. However, when i try to create a room this way:
Code: Select all
sfs.addEventListener(SFSEvent.ROOM_ADD, onGameRoomCreated);
sfs.addEventListener(SFSEvent.ROOM_CREATION_ERROR, onGameRoomCreationError);
var gameRoomSettings:RoomSettings = new RoomSettings("Game");
gameRoomSettings.maxUsers = 2;
gameRoomSettings.isGame = true;
sfs.send(new CreateRoomRequest(gameRoomSettings));
private function onGameRoomCreated(event:SFSEvent):void
{
trace("[SmartFoxConnector] A Game room was added: " + event.params.room );
}
private function onGameRoomCreationError(evt:SFSEvent):void
{
trace("[SmartFoxConnector] An error occurred while attempting to create the Game room: " + evt.params.errorMessage);
}I checked in andmin interface that room name is ok and although the user that's creating this room is with Guest privillege i checked in Smartfoxserver 2X Admin interface that he has room creation privillege but maybe i am missing something? It's strange that i get no error or any notice?
Thanks in advance!