Deletes an existing world configuration from a world server.
AW_CALLBACK_ADMIN_WORLD_RESULT
This method is new in Active Worlds 3.1 and requires at least SDK build 18 and world server build 28.
This is an administration mode method and can only be used by instances created with aw_server_admin.
aw_server_world_delete removes the configuration of the identified by id from the current world server. Only the configuration data is deleted; to completely delete a world, use aw_world_attributes_reset to delete the world's attributes and aw_delete_all_objects to delete the objects.
void delete_world (int world)
{
int rc;
/* delete all traces of a world from the server */
/* first, set the current world so that the world server knows which
world aw_world_attributes_reset and aw_delete_all_objects are
referring to */
if (rc = aw_server_world_set (world)) {
printf ("Unable to set world (reason %d)\n", rc);
return;
}
/* delete the attributes */
if (rc = aw_world_attributes_reset ()) {
printf ("Unable to delete attributes (reason %d)\n", rc);
return;
}
/* delete the objects */
if (rc = aw_delete_all_objects (world)) {
printf ("Unable to delete objects (reason %d)\n", rc);
return;
}
/* finally, delete the world itself */
if (rc = aw_server_world_delete (world)) {
printf ("Unable to delete world (reason %d)\n", rc);
return;
}
printf ("World deleted.\n");
}
aw_server_admin
aw_server_world_add
aw_server_world_change
aw_server_world_list
aw_server_world_set
aw_server_world_start
aw_server_world_stop