[SFS - WARN] RoomVariablesUpdate, unknown Room id

Post here your questions about the Flash / Flex / Air API for SFS2X

Moderators: Lapo, Bax

User avatar
Evil-Dog
Posts: 86
Joined: 08 Mar 2011, 17:59
Contact:

[SFS - WARN] RoomVariablesUpdate, unknown Room id

Postby Evil-Dog » 28 Jun 2014, 19:00

I get this on the client every time I create a room.
[SFS - WARN] RoomVariablesUpdate, unknown Room id = XXXXX
I don't see what would cause this on the server side, any idea?
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: [SFS - WARN] RoomVariablesUpdate, unknown Room id

Postby Lapo » 01 Jul 2014, 17:18

Hi,
please provide the steps of how this happens, including snippets of code for the creation of the Room.

Also the RoomVariablesUpdate event has nothing to do with the creation of a Room, so I suspect there's some other request causing this. Or maybe some other server side code we don't know about.

From the look of it, the error seems client side, not server side as you reported.
Please provide all the details.

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
Evil-Dog
Posts: 86
Joined: 08 Mar 2011, 17:59
Contact:

Re: [SFS - WARN] RoomVariablesUpdate, unknown Room id

Postby Evil-Dog » 15 Sep 2014, 22:05

Well I imagine server side because all my client does as far as I know is send a custom request with parameters to the server to create a room and listens to the SFSEvent.ROOM_JOIN event to keep a reference to the room that is joined. It's basically a create game form and then it goes into a "Waiting for Players" state. so at that point I don't do anything with the room but store it in a variable. I tested without storing the room in a variable and same thing.
[SFS - WARN] RoomVariablesUpdate, unknown Room id = 20
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: [SFS - WARN] RoomVariablesUpdate, unknown Room id

Postby Lapo » 16 Sep 2014, 07:29

Can you show the code where the room is created?
Also please specify which server version you're using and which API version too.
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
Evil-Dog
Posts: 86
Joined: 08 Mar 2011, 17:59
Contact:

Re: [SFS - WARN] RoomVariablesUpdate, unknown Room id

Postby Evil-Dog » 17 Sep 2014, 22:47

Here you go

Code: Select all

CreateSFSGameSettings settings = new CreateSFSGameSettings();
            settings.setName(params.getUtfString("BattleName"));
            settings.setGame(true);
            settings.setGamePublic(true);
            settings.setGroupId("Battles");
            settings.setMaxSpectators(0);
            settings.setExtension(new CreateRoomSettings.RoomExtensionSettings("DarkSiege", "darksiegebattle.DarkSiegeBattle"));
            settings.setMaxVariablesAllowed(20);
            settings.setMinPlayersToStartGame(2);
            settings.setDynamic(true);
            settings.setAutoRemoveMode(SFSRoomRemoveMode.WHEN_EMPTY);
            settings.setLeaveLastJoinedRoom(true);

            Vector<RoomVariable> variables = new Vector<RoomVariable>();
            SFSRoomVariable variable;
           
            variable = new SFSRoomVariable("Available", true);
            variable.setGlobal(true);
            variables.add(variable);

            variable = new SFSRoomVariable("IsRanked", false);
            variable.setGlobal(true);
            variables.add(variable);
            variable = new SFSRoomVariable("CreatorName", sender.getName());
            variable.setGlobal(true);
            variables.add(variable);
            variable = new SFSRoomVariable("Password", params.getUtfString("Password"));
            variable.setGlobal(true);
            variables.add(variable);
           
            variable = new SFSRoomVariable("Army", params.getUtfString("Army"));
            variable.setGlobal(true);
            variables.add(variable);
                       
            variable = new SFSRoomVariable("OpponentArmy", params.getUtfString("OpponentArmy"));
            variable.setGlobal(true);
            variables.add(variable);
                       
            variable = new SFSRoomVariable("BattleRole", params.getUtfString("BattleRole"));
            variable.setGlobal(true);
            variables.add(variable);
           
            variable = new SFSRoomVariable("BattleGround", params.getUtfString("BattleGround"));
            variable.setGlobal(true);
            variables.add(variable);
           
            settings.setRoomVariables(variables);

            SFSExtension extension = getParentExtension();
            Zone zone = extension.getParentZone();
            Room room = SmartFoxServer.getInstance().getAPIManager().getGameApi().createGame(zone, settings, sender);

            // Invite friends.
            if(params.containsKey("Friend"))
            {
                // Not available if a friend is invited.
                room.removeVariable("Variable");
               
                InviteFriend(sender, room, params.getUtfString("Friend"));
            }
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: [SFS - WARN] RoomVariablesUpdate, unknown Room id

Postby Lapo » 18 Sep 2014, 09:11

The error refers to a RoomVariable Update request, but the server side code is only creating a Room. These are two different and unrelated operations. In other words the error is fired in response to a RoomVariable update call.

You should locate which request is causing the error to pop up

It wouldn't hurt to also know the version of the server and client api, as requested before. Thanks :)
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
Evil-Dog
Posts: 86
Joined: 08 Mar 2011, 17:59
Contact:

Re: [SFS - WARN] RoomVariablesUpdate, unknown Room id

Postby Evil-Dog » 18 Sep 2014, 14:01

Sorry sorry, my bad, server version is 2.9.0
Client API version is 1.2.0

And I'll try to locate a room variable update, is that a specific call or just the operation of changing public room variables, hence causing a variable change event?

Return to “SFS2X ActionScript 3 API”

Who is online

Users browsing this forum: No registered users and 15 guests