Aw server world instance add
Minimum requirements | ||
---|---|---|
Added in version 4.1 | ||
SDK | build 58 |
int aw_server_world_instance_add (int id, int instance_id)
Description
Adds a new 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 of a particular world configuration.
- instance_id
- Instance id. Must be a value between 1 and 64. Setting it to 0 will not make this method work like aw_server_world_add.
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_PLUGIN_NOT_AVAILABLE (2)
- World instance plugin is not installed.
- RC_WORLD_INSTANCE_INVALID (2)
- Instance id was invalid (below 0, or above 64)
- RC_DATABASE_ERROR (2)
- Unable to add world instance to the database.
- RC_NO_SUCH_WORLD (2)
- No world configuration with a matching id was found.
- RC_WORLD_INSTANCE_ALREADY_EXISTS (2)
- Instance with a matching id already exists for the world.
(1) Possible return values when a callback is installed.
(2) Returned by the world server.
Returned attributes
Usage
Add an instance #1 to world id #2.
if (aw_server_world_instance_add (2, 1) != RC_SUCCESS) printf ("Failed to add world instance %d\n", aw_int (AW_SERVER_INSTANCE));