vp_enter
Method call snippet
vp_enter(instance, world);
Enters a bot into a world.
Parameters
These are the parameters that this method requires:
Parameter | Usage |
---|---|
VPInstance instance |
Pointer to the instance this method call is intended for |
string world |
Name of an online world to enter |
Returns
This method returns a return code integer, which indicates whether the call was successful or errored for any reason:
Return code | Cause |
---|---|
VP_RC_SUCCESS |
Successful call (for methods that have a registered callback, it only means the request has been sent) |
VP_RC_NOT_INITIALIZED |
SDK not initialized with vp_init() yet
|
VP_RC_CONNECTION_ERROR |
Error connecting to the world server |
VP_RC_TIMEOUT |
Connection attempt to the world server timed out (e.g. firewalled server) |
VP_RC_WORLD_NOT_FOUND |
No such world is connected to the universe |
VP_RC_WORLD_LOGIN_ERROR |
Could not login to world (e.g. incorrect world address configured) or banned (not yet implemented) |
Behavior
- If the bot was already in a world, it will automatically leave that world
Caveats
The bot will not have a visible "presence" in the world (e.g. will not appear to other users or bots') until vp_state_change()
is called at least once.
Examples
- This method has no usage examples; please add at least one to this page