

this problem cropped up every day... and when I use zone.getRoomByName() , but only get one of them. I try to get one and destory, then getRoomByName(), it returns null...the ghost room has own room extension and variables... can you explain this case??
here is my create room code:
Code: Select all
public static Room createNewRoom(String roomId, Zone exitZone) throws IOException{
JSONObject roomInfo = getRoomInfo(roomId);
int maxUser = roomInfo.getInt("maxUser");
// int maxUser = 1000;
CreateRoomSettings newRoomSets = new CreateRoomSettings();
newRoomSets.setName(roomId);
newRoomSets.setPassword("");
newRoomSets.setMaxUsers(maxUser);
newRoomSets.setMaxSpectators(0);
newRoomSets.setDynamic(true);
newRoomSets.setGame(false);
newRoomSets.setHidden(false);
newRoomSets.setAutoRemoveMode(SFSRoomRemoveMode.WHEN_EMPTY);
newRoomSets.setUseWordsFilter(true);
newRoomSets.setExtension(new RoomExtensionSettings("boExt", "com.bo.extension.serverevt.RoomExtensionMain"));
newRoomSets.setMaxVariablesAllowed(20);
List<RoomVariable> rv = initRoomVariableList(roomInfo);
newRoomSets.setRoomVariables(rv);
Room newRoom = null;
try {
newRoom = ((ExtensionMain) exitZone.getExtension()).getApi().createRoom(exitZone, newRoomSets, null);
newRoom.setActive(true);
} catch (SFSCreateRoomException e) {
((SFSExtension) exitZone.getExtension()).trace(e.getMessage());
}
return newRoom;
}