Vp say: Difference between revisions
Jump to navigation
Jump to search
Roy Curtis (talk | contribs) Created page with "{{sdk method page|say|Makes a bot say a message in the current world's chat channel. |paramex=message |parameters= {{sdk parameter row|string|message|Chat message}} |ret..." |
m Removed reason code |
||
Line 4: | Line 4: | ||
{{sdk parameter row|string|message|Chat message}} | {{sdk parameter row|string|message|Chat message}} | ||
|returncodes= | |returncodes= | ||
{{sdk return code row|NOT_IN_WORLD |Bot is not currently in a world}} | {{sdk return code row|NOT_IN_WORLD |Bot is not currently in a world}} | ||
{{sdk return code row|STRING_TOO_LONG|Chat message exceeds 255 characters in length}} | {{sdk return code row|STRING_TOO_LONG|Chat message exceeds 255 characters in length}} |
Revision as of 21:28, 17 December 2016
Method call snippet
vp_say(instance, message);
Makes a bot say a message in the current world's chat channel.
Parameters
These are the parameters that this method requires:
Parameter | Usage |
---|---|
VPInstance instance |
Pointer to the instance this method call is intended for |
string message |
Chat message |
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_IN_WORLD |
Bot is not currently in a world |
VP_RC_STRING_TOO_LONG |
Chat message exceeds 255 characters in length |
Behavior
Like normal chat from other users, the message will appear in the browser with standard black text formatting.
Caveats
The bot will not hear itself speak; it will not receive a VP_EVENT_CHAT
event for its own message.
Examples
- This method has no usage examples; please add at least one to this page