vp_console_message
Method call snippet
vp_console_message(instance, session, name, message, effects, red, green, blue);
Makes a bot send a custom named and/or formatted message to the world or a specific session in-world.
Parameters
These are the parameters that this method requires:
Parameter | Usage |
---|---|
VPInstance instance |
Pointer to the instance this method call is intended for |
int session |
Target session |
string name |
Name to attach to the message |
string message |
Message body |
int effects |
Bitfield of message formatting |
uchar red |
Message color red value |
uchar green |
Message color green value |
uchar blue |
Message color blue value |
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_NOT_IN_WORLD |
Bot is not currently in a world |
VP_RC_STRING_TOO_LONG |
Name or message exceeds 255 characters in length |
Behavior
- There is no special behavior for this method
Examples
- This method has no usage examples; please add at least one to this page
See also
vp_chat()