Synchronization problem

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

Moderators: Lapo, Bax

User avatar
ekrem5353
Posts: 84
Joined: 10 Dec 2015, 15:50

Synchronization problem

Postby ekrem5353 » 27 Sep 2018, 06:29

Hi

I hava a problem with synchronization Where I hava npc characters in the game I keep their names in the field at ZoneExtension

Code: Select all

 private Set<String> reusable_users = new HashSet<>();


when someone creates a gameroom at the RoomAdded event I start scheduler so that scheduler gets a name and find corresponding npc by findUserByName and insert it into game room problem is

Code: Select all

public String removeReusableRobot(String name){
        String name_to_return = null;
        synchronized (reusable_users){
            if(reusable_users.contains(name)){
                name_to_return = name;
                reusable_users.remove(name);
                //sfsExtension.trace(" Bot has been returned   " + name);
            }
        }
        return name_to_return;
 }

this is in the Zone extension here synchronized doesnt work. Different threads get same name. I use synchronized method outside smartfox it never happens.

I had similar issues many times. I fixed the problem by adding a variable to npc like is_this_in use true or false.

I want to know what is causing this


I am using SmartFox 2.11

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

Re: Synchronization problem

Postby Lapo » 27 Sep 2018, 07:42

Hi,
what is exactly that it's not working? You haven't posted any specific errors.

You've posted a code snippet with a synchronization block, but there must be other parts of your code that also access the same data structure, and those need to lock the Set accordingly.

Give us the details such as a full stack trace that we can see.

Also:
this is in the Zone extension here synchronized doesnt work. Different threads get same name. I use synchronized method outside smartfox it never happens.

Usually threads in SFS2X don't get the same names. But, more importantly, the thread name is irrelevant with synchronization issues.

Alternatively:
to simplify your work you could use the Collections.synchronizedSet() to obtain a thread-safe Set to use in your code.
See here:
https://www.java2novice.com/java-collec ... nized-set/

Hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
ekrem5353
Posts: 84
Joined: 10 Dec 2015, 15:50

Re: Synchronization problem

Postby ekrem5353 » 27 Sep 2018, 14:51

Whole code is too long I did not want to bother you with detail. it is so simple let me explain it this way

Code: Select all

public class ZoneExtension extends SFSExtension {
   
   private Set<String> available_names = new HashMap<String>();
   
   
   @Override
   public void init() {
      fillNames();
      addEventHandler(SFSEventType.ROOM_ADDED, RoomAddedHandler.class);
   }
   
   
   private void fillNames(){
      available_names.add("Name 1");
      available_names.add("Name 2");
   }
   
public String getName(){
        String name null;
        synchronized (available_names){
            if(available_names.size()> 0){
                name = available_names.remove(0);
            }
            sfsExtension.trace("Name taken users size ", users.size(), "name ", name);
        }
        return name;
    }
   
}


public class RoomAddedHandler extends BaseServerEventHandler {
   
   
   @Override
    public void handleServerEvent(ISFSEvent params) throws SFSException {

        ZoneExtension zoneExtension = (ZoneExtension) getParentExtension();
      
      String name = zoneExtension.getName();
      trace(name);
      // Here is the problem  2 Room gets added and I get 2. same string
      
   }
   
   
}



npc players are already in the game I have a list when I insert one of them in one game room I also remove it from available_names. although in the method I use synchronize block "synchronize(available_name) " in the method. since 2 thead gets the same name "string from available_names collection" I insert that npc to more than one game room.

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

Re: Synchronization problem

Postby Lapo » 27 Sep 2018, 17:17

This line should not compile:
private Set<String> available_names = new HashMap<String>();

as the type is Set not Map. Maybe it's a typo.

In this case I would recommend not to synchronize manually but instead doing as I proposed in my previous reply.

You can use the Collections.synchronizedSet() to obtain a thread-safe Set to use in your code.
See here:
https://www.java2novice.com/java-collec ... nized-set/

Hope it helps
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
ekrem5353
Posts: 84
Joined: 10 Dec 2015, 15:50

Re: Synchronization problem

Postby ekrem5353 » 09 Oct 2018, 09:50

I just wanted to understand, why it works differently in smartfox. So I could write code accordingly. This is not the first time I had to use synchronization. I could use synchronized set but I will check whether that entry is in use then remove that entry and return that entry to which ever code that requested it. I also need to use that to give names to newly created game rooms. for example when someone sends request to create new game room if user in the group name SULTANZADE I give the first name SUZ1 and second user created the game room I give the name SUZ2. And when the first game room closed down. SUZ1 should be available again. and next time someone creates game room that rooms name should be SUZ1. Now at the moment I use SmartFox 2.11 and if someone create game room with same name second room throws exception so It wont cause problem. When I move to SmartFox 2.12 or SmartFox 2.13 I see multiple game rooms get created with the same name. I tried to synchronize it but it didn't work and I moved the games back to 2.11.
Bourdon
Posts: 1
Joined: 03 Oct 2018, 08:59

Re: Synchronization problem

Postby Bourdon » 10 Oct 2018, 10:13

Are rooms with the same name a big problem btw? If so, why is that? I'm just curious.
User avatar
Lapo
Site Admin
Posts: 20436
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Synchronization problem

Postby Lapo » 10 Oct 2018, 15:48

ekrem5353 wrote:I just wanted to understand, why it works differently in smartfox.

Synchronization does not work differently in SmartFoxServer as it is a keyword of the Java language and therefore works the same in any Java application.


for example when someone sends request to create new game room if user in the group name SULTANZADE I give the first name SUZ1 and second user created the game room I give the name SUZ2. And when the first game room closed down. SUZ1 should be available again. and next time someone creates game room that rooms name should be SUZ1. Now at the moment I use SmartFox 2.11 and if someone create game room with same name second room throws exception so It wont cause problem. When I move to SmartFox 2.12 or SmartFox 2.13 I see multiple game rooms get created with the same name. I tried to synchronize it but it didn't work and I moved the games back to 2.11.

It sounds like you've some problems in your code.
For starters Room should be assigned a name when you create them. Later you can still rename them via the SFSApi.changeRoomName(...) method.

I suspect you might be assigning the name via Room.setName() which is incorrect, and will cause problems, regardless of what version of SFS2X you're running.

Cheers
Lapo

--

gotoAndPlay()

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

Re: Synchronization problem

Postby Lapo » 10 Oct 2018, 15:51

Bourdon wrote:Are rooms with the same name a big problem btw? If so, why is that? I'm just curious.

Yes, they are. Every room must have a unique name, otherwise methods like findRoomByName(...) would not be able to return the exact Room you're looking for.

But the server API won't allow you to create the Rooms with duplicate names, unless you're bypassing the API in your server-side code in which case it sounds like you're shooting yourself in the foot, so to speak :)

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
ekrem5353
Posts: 84
Joined: 10 Dec 2015, 15:50

Re: Synchronization problem

Postby ekrem5353 » 15 Oct 2018, 14:59

Hi,

I still have same problem. when I move to SmartFox 2.13.3 game rooms are being created with same name. I sent the picture room:id 47 and room:id 49 have same room name OYZ7.
User avatar
ekrem5353
Posts: 84
Joined: 10 Dec 2015, 15:50

Re: Synchronization problem

Postby ekrem5353 » 16 Oct 2018, 06:44

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

Re: Synchronization problem

Postby Lapo » 16 Oct 2018, 07:09

Hi,
ekrem5353 wrote:I still have same problem. when I move to SmartFox 2.13.3 game rooms are being created with same name. I sent the picture room:id 47 and room:id 49 have same room name OYZ7.

Please show us the code you use for creating Rooms.

As regards your synchronization code you have only posted the part where you check if a name exist and remove it.
Are you also synchronizing the part where you add names to the Set?

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
ekrem5353
Posts: 84
Joined: 10 Dec 2015, 15:50

Re: Synchronization problem

Postby ekrem5353 » 16 Oct 2018, 07:28

Code: Select all

public class ZoneExtension extends SFSExtension {


    @Override
    public void init() {
        Set<String> room_names_set = new HashSet<String>();
        Set<String> sys_room_names = Collections.synchronizedSet(room_names_set);
***********************************************************************************************************************

public synchronized String createRoomName(Room staticRoom) {
        String[] prefixArr = {"LOBBY", "CAZ", "USZ", "SSA", "BEZ", "SEZ", "SUZ", "OYZ", "HAZ", "ADZ"};
        String prefix = null;
        String strRoomName = null;

        switch (staticRoom.getName()) {
            case "caylakZade":
                prefix = prefixArr[1];
                break;
            case "ustaZade":
                prefix = prefixArr[2];
                break;
            case "seriSalon":
                prefix = prefixArr[3];
                break;
            case "beyZade":
                prefix = prefixArr[4];
                break;
            case "sehZade":
                prefix = prefixArr[5];
                break;
            case "sultanZade":
                prefix = prefixArr[6];
                break;
            case "oyunZade":
                prefix = prefixArr[7];
                break;
            case "hanZade":
                prefix = prefixArr[8];
                break;
            case "adminZade":
                prefix = prefixArr[9];
                break;
            default:
                break;
        }
        Zone zone = getParentZone();
        int availableInt = 1;
        while (true) {
            String newRoomName = prefix + availableInt;
            if(!sys_room_names.contains(newRoomName)){
                strRoomName = newRoomName;
                break;
            }
            availableInt++;
        }

        sys_room_names.add(strRoomName);
        return strRoomName;
    }

public class CreateGameRequestHandler extends BaseClientRequestHandler {

    @Override
    public void handleClientRequest(User user, ISFSObject obj) {
        final String LOW_POINTS_MSG = " )): user points are very low. :(( user id:->";
        ZoneExtension extension = (ZoneExtension) getParentExtension();


        /** The point will be the default room value that the creator specified. */
        int roomPoint = obj.getInt("point");

        Room room = user.getLastJoinedRoom();


        if (!room.isGame()) {

            String[] betRange = room.getVariable("bet_range").getStringValue().split(" ");
            int minBetRange = Integer.parseInt(betRange[0]);
            int maxBetRange = Integer.parseInt(betRange[betRange.length - 1]);

            /** Players can only create game room with point within the bet range. */
            if (roomPoint < minBetRange || roomPoint > maxBetRange) {

                return;
            }
        }

        /**
         * Every player can only be in one game room at a time, when a player send a game room create request,
         * the must have not been in a game room. If the player is already in a game room then room creation
         * operation will be terminated. Otherwise the player will be allowed to create a game room to play games.
         */
        if (user.getJoinedRooms().size() > 1 || user.getJoinedRooms().size() < 1 || user.getJoinedRooms().iterator().next().isGame()) {
            new GlobalOperations().generalErrors(getParentExtension(), user, 1);
            //service.shutdownNow();
            return;
        }

        long userPoint = user.getVariable(GlobalStrings.USER_BIG_POINT).getSFSObjectValue().getLong("p");

        if (userPoint < roomPoint) {
            //trace(ExtensionLogLevel.WARN, CreateGameRequestHandler.class.getName(), LOW_POINTS_MSG, user.getName());
            //service.shutdownNow();
            return;
        }

        boolean admin_room = false;
        if(user.getPrivilegeId() == 3) {
            admin_room = true;
        }
        obj.putBool(GlobalStrings.ADMIN_ROOM, admin_room);

        try {

            /** Now create the game. */
            Room gameRoom = extension.createGame(obj, extension, user);
            ISFSObject isfsObj = SFSObject.newInstance();
            isfsObj.putInt(GlobalStrings.INTERNAL_SLOT_KEY, 1);  // We created the room we sit first
            isfsObj.putUtfString(GlobalStrings.INTERNAL_USER_ID_KEY, user.getName());
            if(user.isNpc()){
                isfsObj.putBool(GlobalStrings.INTERNAL_FAKE_USER, true);
            }

            gameRoom.getExtension().handleInternalMessage(GlobalStrings.CMD_JOIN_AS_PLAYER,isfsObj );

        } catch (ExecutionException | InterruptedException ex) {
            trace(ExtensionLogLevel.ERROR, CreateGameRequestHandler.class.getName(), "ERROR:->", ex);
            //service.shutdownNow();
            return;
        }catch (Exception e) {
            trace(ExtensionLogLevel.ERROR, CreateGameRequestHandler.class.getName(), "ERROR:->", e);
            e.printStackTrace();
        }

    }



}



public synchronized static Room createGame(final ISFSObject obj, final ZoneExtension extension, final User user) throws Exception {
        Zone zone = extension.getParentZone();
        try {
            List<RoomVariable> variables = GameRoomVariablesCreator.setUpRoomVariables(extension, obj, user);
            CreateSFSGameSettings settings = GameSettingsCreator.createGameSettings(extension, obj, user);
            /** Get the result variables and setting from executor for another use.*/
            settings.setRoomVariables(variables);
            Room room = SmartFoxServer.getInstance().getAPIManager().getGameApi().createGame(zone, settings, user);
            return room;
        } catch (SFSCreateRoomException exc) {
            extension.trace(ExtensionLogLevel.ERROR, GameCreator.class.getName(),"GAME ROOM CREATION ERROR:->", exc.getMessage());
            return null;
        }

    }


public class GameRoomVariablesCreator  {

    public static List<RoomVariable> setUpRoomVariables(final ZoneExtension extension, final ISFSObject object,final User user) throws Exception {
        final String GAME_ROOM_VARIABLES_CREATED = "Game room variables has been created successfully.";

        /**The game type that the player can select and player. */
        int type = object.getInt(GlobalStrings.TYPE);

        /** The point will be the default room value that the creator specified. */
        int roomPoint = object.getInt(GlobalStrings.TABLE_POINT);

        /** The timer that a player must play before it expire. */
        int timer = object.getInt(GlobalStrings.TIMER);

        if(timer == 0) {
            timer = 6000;
        }else if(timer == 10) {
            timer = 20;
        }


        /**
         * <p>List of other game room options that a game room creator may select from.</p>
         * <p>cB1: Allow chating while playing game (Y/N).</p>
         * <p>cB2: Allow spectator chat (Y/N).</p>
         * <p>cB3: Allow spectator to see players cards (Y/N). </p>
         * <p>cB4: Only players that are invited can join the game and play (Y/N). </p>
         * <p>cB5: When a player leave the game, computer/robot should take over his slot and play (Y/N). </p>
         */
        ISFSObject boolArr = object.getSFSObject(GlobalStrings.OPTIONAL_PARAMS);  // boolArr

        /**
         * Before game is started or when players are playing, a spectator may
         * like to join the room and watch the game. But for any game/room the
         * number spectators of spectators are limited.
         */
        int spectatorsCount = object.getInt(GlobalStrings.SPECTATOR_COUNT);

        /** Set the player room variables. */
        List<RoomVariable> roomVariableList = new ArrayList<>();


        // TODO: dışardan gelmeli kaç ellik olduğu ona göre slotlar oluşturulacak
        /** Create room variable that will be added to game settings. */
        for (int i = 1; i <= GlobalStrings.MIN_PLAYERS; i++) {
            ISFSObject variableObject = SFSObject.newInstance();
            if (i == 1) {
                variableObject.putUtfString(GlobalStrings.USER_NAME, user.getName());
                new GlobalOperations().setSlotInfo(extension, user, i);
            } else {
                variableObject.putNull(GlobalStrings.USER_NAME);
            }
            variableObject.putBool(GlobalStrings.IS_PAUSE, false);
            variableObject.putInt(GlobalStrings.SLOT_ID, i);

            RoomVariable roomVar = new SFSRoomVariable(GlobalStrings.SLOT + i, variableObject);
            roomVar.setPrivate(true);
            roomVar.setGlobal(true);
            roomVariableList.add(roomVar);
        }

        /** Create a room owner variable. */
        RoomVariable roomOwner = new SFSRoomVariable(GlobalStrings.ROOM_OWNER_SLOT_ID, 1);
        roomOwner.setGlobal(false);
        roomOwner.setPrivate(true);
        roomVariableList.add(roomOwner);


        RoomVariable roomActive=  new SFSRoomVariable(GlobalStrings.GAME_ACTIVE, false);
        roomActive.setPrivate(true);
        roomActive.setGlobal(true);
        roomVariableList.add(roomActive);

        RoomVariable roomState = new SFSRoomVariable(GlobalStrings.GAME_STATE, GameState.NOTSTARTED.getId());
        roomState.setPrivate(true);
        roomState.setGlobal(false);
        roomVariableList.add(roomState);

        RoomVariable minPlayersVariable = new SFSRoomVariable(GlobalStrings.MIN_PLAYERS_TO_START_GAME, GlobalStrings.MIN_PLAYERS);
        minPlayersVariable.setPrivate(true);
        minPlayersVariable.setHidden(true);
        roomVariableList.add(minPlayersVariable);

        boolean admin_room  = object.getBool(GlobalStrings.ADMIN_ROOM);

        RoomVariable adminRoom = new SFSRoomVariable(GlobalStrings.ADMIN_ROOM, admin_room);
        adminRoom.setPrivate(true);
        adminRoom.setHidden(true);
        roomVariableList.add(adminRoom);

        String language = "tr";

        if(object.containsKey(GlobalStrings.LANG)){
            language = object.getUtfString(GlobalStrings.LANG);
        }


        /** Create game options object. */
        SFSObject gameOptionsObj = SFSObject.newInstance();
        gameOptionsObj.putInt(GlobalStrings.TYPE, type);
        gameOptionsObj.putInt(GlobalStrings.TABLE_POINT, roomPoint);
        gameOptionsObj.putInt(GlobalStrings.TIMER, timer);
        gameOptionsObj.putInt(GlobalStrings.TIMER_FIRST, 40);
        gameOptionsObj.putUtfString(GlobalStrings.GAME_NAME_VARIABLE, GlobalStrings.GAME_NAME); 
        gameOptionsObj.putSFSObject(GlobalStrings.OPTIONAL_PARAMS, boolArr);
        gameOptionsObj.putUtfString(GlobalStrings.LANG, language);

        gameOptionsObj.putInt(GlobalStrings.SPECTATOR_COUNT, 10); 
        gameOptionsObj.putBool(GlobalStrings.HELP, object.getBool(GlobalStrings.HELP));
        gameOptionsObj.putBool(GlobalStrings.FOLDING, object.getBool(GlobalStrings.FOLDING));
        gameOptionsObj.putBool(GlobalStrings.PUNISHMENT, object.getBool(GlobalStrings.PUNISHMENT));

        boolean start_with_robot_button = false;
        gameOptionsObj.putBool(GlobalStrings.SHOW_START_WITH_ROBOT_BUTTON, start_with_robot_button);


        boolean spectator_allowed = true;
        if(spectatorsCount == 0)
        {
            spectator_allowed = false;
        }
        gameOptionsObj.putBool(GlobalStrings.SPECTATOR_ALLOWED, spectator_allowed);




        RoomVariable gameOptionsVariable = new SFSRoomVariable(GlobalStrings.GAME_OPTIONS_SETTINGS, gameOptionsObj);
        gameOptionsVariable.setPrivate(true);
        gameOptionsVariable.setGlobal(true);
        roomVariableList.add(gameOptionsVariable);

        /** Create a round variable that will be use to check for last round when playing. */
        RoomVariable roundCount = new SFSRoomVariable(GlobalStrings.ROUND_COUNT, 1);
        roundCount.setGlobal(false);
        roundCount.setPrivate(true);
        roundCount.setHidden(true);
        roomVariableList.add(roundCount);

        return roomVariableList;
    }
}


public class GameSettingsCreator {

    public static CreateSFSGameSettings createGameSettings(final ZoneExtension extension, final ISFSObject object, final User user) throws Exception {


        // Create room name dynamically
        String gameRoomName = null;
        if(user.isNpc()){
            List<Room> joined_rooms = user.getJoinedRooms();
            for(Room r :joined_rooms){
                if(!r.isGame()) {
                    gameRoomName = extension.createRoomName(r);
                    break;
                }
            }
        }else {
            List<String> userGroups = user.getSubscribedGroups();
            Room staticRoom =extension.getParentZone().getRoomByName(userGroups.get(0));
            gameRoomName = extension.createRoomName(staticRoom);
        }
        // End of creating dynamic room name

        //final String GAME_ROOM_SETTINGS_CREATED = "Game room settings has been created successfully.";

        //int spectatorsCount = object.getInt("sc");   // Herzaman 10 olacak sa
        CreateSFSGameSettings settings = new CreateSFSGameSettings();

        settings.setAutoRemoveMode(SFSRoomRemoveMode.WHEN_EMPTY);
        settings.setDynamic(true);
        settings.setExtension(new CreateRoomSettings.RoomExtensionSettings("Kelime101Extension", "com.ecmur.kelime101.extensions.GameRoomExtension"));
        settings.setGame(true);
        settings.setGamePublic(true);
        settings.setGroupId(user.getLastJoinedRoom().getGroupId());
        settings.setLeaveLastJoinedRoom(false);
        settings.setMaxSpectators(10);
        settings.setMaxUsers(GlobalStrings.MIN_PLAYERS);
        settings.setMinPlayersToStartGame(GlobalStrings.MIN_PLAYERS);
        settings.setName(gameRoomName);
        settings.setNotifyGameStartedViaRoomVariable(true);
        settings.setUseWordsFilter(true);
        //settings.setRoomVariables(roomVarList);
        settings.setMaxVariablesAllowed(30);


        //extension.trace(GameSettingsCreator.class.getName(), GAME_ROOM_SETTINGS_CREATED);

        return settings;
    }
}
User avatar
ekrem5353
Posts: 84
Joined: 10 Dec 2015, 15:50

Re: Synchronization problem

Postby ekrem5353 » 16 Oct 2018, 07:34

Code: Select all

public class RoomRemovedEventHandler extends BaseServerEventHandler {
    private final String TAG = RoomRemovedEventHandler.class.getSimpleName() + " ///=> ";

    @Override
    public void handleServerEvent(ISFSEvent event) throws SFSException {

        Room room = (Room) event.getParameter(SFSEventParam.ROOM);
        Zone zone = (Zone) event.getParameter(SFSEventParam.ZONE);
        User user = (User) event.getParameter(SFSEventParam.USER);

        String roomGroupName = room.getGroupId();
        Room staticRoom = zone.getRoomByName(roomGroupName);


        ZoneExtension zoneExtension = (ZoneExtension) getParentExtension();

        // TODO: burada  odada npc robotlar varsa gameroom değişkenlerini sıfırla çünkü oda silinince oda numarası üstlerinde kalıyor



        if (staticRoom == null) {
            return;
        }

        if(room.isGame()){
            List<User> user_list = room.getUserList();
            for(User u: user_list){

                if(u.isNpc()){
                    /** Re-set user room name variable to null, this will enable client to remove room name from interface. */
                    UserVariable userRoomName = new SFSUserVariable(GlobalStrings.ROOM_NAME, "null", false);    // This should be moved to filter
                    getApi().setUserVariables(u, Arrays.asList(userRoomName));
                }
            }
        }


        if(room.isGame()){
            zoneExtension.giveRoomNameBack(room.getName());
        }
    }
}

public class ZoneExtension extends SFSExtension {

private static ZoneExtension ext;

private final String version = "0.1.4.2";
    private final String TAG = ZoneExtension.class.getSimpleName() + " ///=> ";


    private Set<String> sys_room_names;


    public void giveRoomNameBack(String name) {
        sys_room_names.remove(name);
    }

    @Override
    public void init() {
        Set<String> room_names_set = new HashSet<String>();
        Set<String> sys_room_names = Collections.synchronizedSet(room_names_set);
User avatar
ekrem5353
Posts: 84
Joined: 10 Dec 2015, 15:50

Re: Synchronization problem

Postby ekrem5353 » 16 Oct 2018, 07:37

I tried many different ways to fix this problems before. I checked if the game room is in the zone. I got room list and search through it and create it if it doesn't exist. I dont have this problem wiht Smartfox 2.11
User avatar
Lapo
Site Admin
Posts: 20436
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Synchronization problem

Postby Lapo » 16 Oct 2018, 16:49

Hi,
if the mechanism you have built to create unique names works as expected you should always generate a valid room name, that is not already in use.

If this is true, it's not clear how duplicate Rooms could be created.

It would help if you could provide a repro-case of the problem, but before that I would make sure the code you're using for generating the unique names works correctly.

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 18 guests