_server.destroyRoom()
Availability:
SmartFoxServer PRO 1.4.0
Usage:
_server.destroyRoom(zone, roomId)
Description:
Destroys an empty room.
Properties:
| zone | the Zone object containing the room | |
| roomId | the id of the room to destroy |
Returns:
true if the room was delete successfully.
Example:
function init()
{
// Remove a temporary room at startup
var roomId = 10
var zone = _server.getCurrentZone()
var ok = _server.destroyRoom(zone, roomId)
if (ok)
trace("Room was destroyed!")
else
trace("Could not destroy temp room with id = " + roomId + " in Zone = " + zone.getName())
}
See also: