Aw server world instance delete

From ActiveWiki
Revision as of 17:19, 28 October 2008 by Macavity (talk | contribs) (→‎Arguments)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Minimum requirements
Added in version 4.1
SDKbuild 58


int aw_server_world_instance_delete (int id, int instance_id)

Description

Deletes an instance of a particular world.

Callback

AW_CALLBACK_ADMIN_WORLD_RESULT

Notes

This method requires that the world instance plugin is installed.

Arguments

id
Unique id number of a particular world configuration.
instance_id
Instance id. Must be a value between 0 and 64. If set to 0 then it would remove the entire world configuration. This would be equivalent to calling aw_server_world_delete.

Argument attributes

None

Return values

RC_SUCCESS (1) (2)
RC_NOT_INITIALIZED (1)
RC_NO_INSTANCE (1)
RC_NO_CONNECTION (1)
The connection to the world is down.
RC_UNAUTHORIZED (2)
Only world server administration instances may use this method.
RC_NO_SUCH_WORLD (2)
No world has been set or it has become invalid.
RC_DATABASE_ERROR (2)
Unable to delete the world instance from the database.

(1) Possible return values when a callback is installed.

(2) Returned by the world server.

Returned attributes

AW_SERVER_ID
AW_SERVER_INSTANCE
AW_SERVER_NAME

Usage

Delete instance #1 of world id #2.

 if (aw_server_world_instance_delete (2, 1) != RC_SUCCESS)
   printf ("Failed to delete world instance %d\n",
     aw_int (AW_SERVER_INSTANCE));

See also