PDA

View Full Version : addUsersToRoom error



ritty
08-14-2009, 09:30 AM
Scenario:

User logs in, goes to default room, the lobby, which displays lists of games.

User very quickly (e.g., within 1 second) clicks on one of the games to join. When joining the game, the user is listed in the response under .getFailedNames. If the user doesn't try to join the game very quickly after login, all is fine.

The weirdest part of this is that the user actually successfully enters the room, despite being listed as a failed name.


// Create user entry
UserConfig user = new UserConfig();
user.setUserName(username);
user.setReceivingRoomAttributeUpdates(false);
user.setReceivingRoomListUpdates(false);
user.setReceivingRoomVariableUpdates(false);
user.setReceivingUserListUpdates(false);
user.setReceivingUserVariableUpdates(false);
user.setReceivingVideoEvents(false);
ArrayList<UserConfig> users = new ArrayList<UserConfig>();
users.add(user);

RoomResponse response = server.getApi().addUsersToRoom(zoneId, roomId, "", users);

// Check for failure
Collection<String> fails = response.getFailedNames();

// The username is shown on failure, e.g., [bobby]
System.out.println(fails.toString());

tcarr
08-14-2009, 09:38 AM
When does the list of games to join get displayed? Is that after the user's client gets the JoinRoomResponse for the lobby room?

Most of the projects I've been involved with have swfs that need to be loaded (or a response from a server level plugin) before a user is allowed to join a game, so this hasn't come up before for me personally.

I'll add this as a bug report after I have enough details.

ritty
08-29-2009, 09:46 AM
Please ignore...dumb ritty error.