This is how I am creating my room in server side(java)
newRoom = helper.createRoom(currZone, map, null, roomVars, null, false, true, true);
This is how I am trying to destroy the room
Code: Select all
private void destroyRoom(ExtensionEnum extensionEnum) {
trace("***destroyRoom*****");
trace("extensionEnum ["+extensionEnum.getValue()+"]");
if (extensionEnum == ExtensionEnum.USER_LOST) {
trace("currentRoom.getUserList().length ["+currentRoom.getUserList().length+"]");
if (currentRoom.getUserList().length == 1) {
trace("destroying");
helper.destroyRoom(currZone, currentRoom.getId());
}
} else {
trace("currentRoom.getUserList().length ["+currentRoom.getUserList().length+"]");
if (currentRoom.getUserList().length == 0) {
trace("destroying");
helper.destroyRoom(currZone, currentRoom.getId());
}
}
}
But room is not getting destryed..even after calling destroyRoom method...room still exists...
Also, in User_Lost event, room count always stays at "1"...is that the reason why its not getting destroyed???