Aw world instance set

From ActiveWiki
Jump to navigation Jump to search


Minimum requirements
Added in version 4.1
SDKbuild 58


int aw_world_instance_set (int citizen, int id)

Descrption

Assigns a citizen to another instance of the world.

Callback

AW_CALLBACK_WORLD_INSTANCE

Notes

This method requires that the world instance plugin is installed.

Arguments

citizen
Citizen number.
id
Instance id.

Attribute arguments

None

Return values

RC_SUCCESS (1) (2)
NOT_INITIALIZED (1)
RC_NO_INSTANCE (1)
RC_NO_CONNECTION (1)
The connection to the world is down.
RC_UNAUTHORIZED (1) (2)
Only world server administration instances or those owned by a caretaker (i.e. aw_bool (AW_WORLD_CARETAKER_CAPABILITY) returns 1) may use this method.
RC_NO_SUCH_CITIZEN (2)
No user with a matching citizen number was found in the world, or citizen number was specified as 0 (i.e. tourists can not be assigned to a world instance).
RC_PLUGIN_NOT_AVAILABLE (2)
World instance plugin is not installed.
RC_WORLD_INSTANCE_INVALID (2)
No instance with a matching id was found for the current world.

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

(2) Returned by the world server.

Returned attributes

AW_AVATAR_CITIZEN
AW_AVATAR_WORLD_INSTANCE

Usage

Assign citizen #4711 to world instance #1.

if (aw_world_instance_set (4711, 1) == RC_SUCCESS)
  printf ("Citizen 4711 is assigned to world instance %d\n",
    aw_int (AW_AVATAR_WORLD_INSTANCE));

See also