Max Room Variables not being set

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

ealiensoft
Posts: 54
Joined: 06 Feb 2008, 07:21
Contact:

Max Room Variables not being set

Postby ealiensoft » 01 Mar 2014, 03:54

Hello, I've set in my zone configuration to allow 10 room variables, yet when I create a new game room and monitor it, it shows a max of 5. Any idea why it wouldn't allow my full 10 that I set in the zone configuration?

I'm using version 2.8.1

Thanks
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Max Room Variables not being set

Postby Lapo » 01 Mar 2014, 09:19

Did you restart the server after having changed the settings?
Lapo
--
gotoAndPlay()
...addicted to flash games
ealiensoft
Posts: 54
Joined: 06 Feb 2008, 07:21
Contact:

Re: Max Room Variables not being set

Postby ealiensoft » 01 Mar 2014, 18:07

Hi, I've tried restarting the server multiple times, it seems that changing the variable has no effect. If I look in my zone's actual configuration file, it shows the correct amount for the room variables, but when I create a room and monitor it, it shows on the permissions page that only 5 are allowed instead of 10.
ealiensoft
Posts: 54
Joined: 06 Feb 2008, 07:21
Contact:

Re: Max Room Variables not being set

Postby ealiensoft » 01 Mar 2014, 18:10

Another odd thing, I have a few manually created rooms in the zone. When I monitor them, they show the correct amount of room variables supported. It's only when a client creates a room that it shows 5 instead of 10.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Max Room Variables not being set

Postby Lapo » 01 Mar 2014, 21:01

This sounds quite strange.
We don't know of any problem with Room Variables but more importantly I can't even reproduce what you're describing.
I can configure 20 max Room Variables in the Zone, restart and when I move to the ZoneMonitor I get the same value, 20.

Given that this is quite a trivial issue I may be inclined to suspect that the problem is local to your installed copy.
I would suggest a test: shut down the server, then install another copy of the Server by downloading the installer from our website and put it in another folder so that you don't overwrite your current one.
You should see that it works correctly. If that's the case I would suggest to migrate the config files and Zone to the new installation and ditch the old one.

Let me know if it works
Lapo

--

gotoAndPlay()

...addicted to flash games
ealiensoft
Posts: 54
Joined: 06 Feb 2008, 07:21
Contact:

Re: Max Room Variables not being set

Postby ealiensoft » 10 Mar 2014, 17:24

Hi Lapo,

I installed on a new machine, and I was getting the same problem.

I was able to fix it by setting the max variables when creating the room(settings.maxVariables = 20;). For some reason, it wouldn't take the default value set by the zone.

Thanks

Bobby
User avatar
Rob
Posts: 53
Joined: 01 Jul 2017, 07:33

Re: Max Room Variables not being set

Postby Rob » 29 Aug 2018, 08:29

This problem still exists with version 2.13.3.

I have changed the max variables to 20, and that shows up in the admin tool but all rooms created (server-side) still get 5 as the limit.

I had to implement the same workaround to get it working.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Max Room Variables not being set

Postby Lapo » 29 Aug 2018, 08:42

Did you restart the server after changing the value in the config?
That's required.
Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
Rob
Posts: 53
Joined: 01 Jul 2017, 07:33

Re: Max Room Variables not being set

Postby Rob » 29 Aug 2018, 09:59

Yes, the server has been restarted multiple times since that setting was configured.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Max Room Variables not being set

Postby Lapo » 30 Aug 2018, 07:15

Can you send us your Zone configuration?
You can find the file under SFS2X/zones/

You can send it to our support@... email box with a reference to this thread.

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
FlyingSerg1
Posts: 8
Joined: 31 Aug 2018, 02:18

Re: Max Room Variables not being set

Postby FlyingSerg1 » 31 Aug 2018, 04:10

Hello Lapo, I have the same problem with room variables. In zone configuration it is 20 but server allows me to set only 5. Here is the log message:
WARN [SFSWorker:Ext:3] api.SFSApi - The max number of variables (5) for this Room: 1853476808438840812 was reached. Discarding variable: players.list

Details: zone has two extensions one is to control lobby and handles create game requests, other one is room extension and handles actual game. Lobby extension creates games on server side using this:

Code: Select all

      CreateSFSGameSettings settings = new CreateSFSGameSettings();
      settings.setName(gameInstanceId);
      settings.setMinPlayersToStartGame(options.getNumberOfPlayers());
      .....
      CreateRoomSettings.RoomExtensionSettings extensionSettings = new CreateRoomSettings.RoomExtensionSettings("someId","someClassName");
      settings.setExtension(extensionSettings);
      ...
      Room room = getExtension().getGameApi().createGame(zone, settings, user, true, false);


Looks like when you create game/room with extensions using "new" settings it does not take into account zone settings and just use default if not set. As a work around I can use Zone.getMaxRoomVariablesAllowed() and set it for new settings but in this case I have to set all possible values from zone configuration. It would be nice to have copy/clone or something from Zone with actual zone settings and then set only what I need. Like number of players and id.

Regards,
Sergey
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Max Room Variables not being set

Postby Lapo » 31 Aug 2018, 07:11

Rob wrote:This problem still exists with version 2.13.3.

I have changed the max variables to 20, and that shows up in the admin tool but all rooms created (server-side) still get 5 as the limit.

I had to implement the same workaround to get it working.

I've seen the file you've sent us.
The Zone file doesn't contain any Room definitions, so I assume you're creating Rooms via code, either from client or server.

When you create Rooms from code you must specify the amount of max variables allowed in that specific Room. If you don't a default value of 5 will be applied.

You can specify the required value via the CreateRoomSettings.setMaxVariablesAllowed(...) method.

Hope it helps
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Max Room Variables not being set

Postby Lapo » 31 Aug 2018, 07:15

FlyingSerg1 wrote:Hello Lapo, I have the same problem with room variables. In zone configuration it is 20 but server allows me to set only 5.

Please take a look at the reply above I gave to Rob.
viewtopic.php?p=88276#p88276

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
FlyingSerg1
Posts: 8
Joined: 31 Aug 2018, 02:18

Re: Max Room Variables not being set

Postby FlyingSerg1 » 31 Aug 2018, 18:26

Thank you for reply. I guess I have to set everything from Zone configuration manually to room settings.

From framework prospective it would be nice to be able to copy/clone room settings from Zone actual settings and then set only what I need. Like number of players and id.

Regards,
Sergey.

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 55 guests