vp_say

From Virtual Paradise Wiki
Revision as of 15:27, 30 September 2013 by 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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
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_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 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

See also