Page 1 of 1

Create bug room

Posted: 05 Mar 2015, 16:27
by Lucas
I create Room:

Code: Select all

      var settings:RoomSettings = new RoomSettings(roomName);
      settings.groupId = DEFAULT_GROUP;
      settings.isGame = true;
      settings.maxUsers = roomMaxS*2;
      settings.maxSpectators = 0;
      settings.maxVariables = 10;
      
      settings.extension = new RoomExtension(EXTENSION_ID, EXTENSIONS_CLASS);
      settings.variables = new Array();
      settings.variables.push(new SFSRoomVariable("map_", createGameWin["ns_karta"].selectedItem.data));
      settings.variables.push(new SFSRoomVariable("usl", createGameWin["ns_usl"].selectedItem.data));
      settings.variables.push(new SFSRoomVariable("time", createGameWin["ns_time"].selectedItem.data));
      settings.variables.push(new SFSRoomVariable("t1", createGameWin["team1"]));
      settings.variables.push(new SFSRoomVariable("t2", createGameWin["team2"]));
      settings.variables.push(new SFSRoomVariable("t1c", 0));
      settings.variables.push(new SFSRoomVariable("t2c", 0));
      var userVars:Array = [];
      userVars.push(new SFSUserVariable("tm", createGameWin["myteam"]));
      sfs.send( new SetUserVariablesRequest(userVars));
      
      sfs.send( new CreateRoomRequest(settings, true, sfs.lastJoinedRoom ));

Sometimes the rooms are created without an extension and without the user to create a room.

Re: Create bug room

Posted: 05 Mar 2015, 16:47
by Lapo
Hi,
Rooms are not created spontaneously without a specific request :)

For example clients can send a request to create Rooms. If you want to control room creation exclusively from server-side (e.g. Extension) you will have to configure the permissions of your Zone so that client CreateRoom requests are refused.

See Zone Permission's here:
http://docs2x.smartfoxserver.com/Advanc ... ge-manager

cheers

Re: Create bug room

Posted: 05 Mar 2015, 17:38
by Lucas
If it's privileges, all users have the same rights.
From the same room can be created by normal, but may not extension and autojoin

Re: Create bug room

Posted: 07 Mar 2015, 12:54
by Lucas
The problem was technical limitations threads on VPS server. Logs were many, so this problem does not seem to have time in the last 500 messages filter WARN or ERROR