vp_say

From Virtual Paradise Wiki
Revision as of 01:05, 18 December 2016 by Sleepy E (talk | contribs)
(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_IN_WORLD Bot is not currently in a world
VP_RC_STRING_TOO_LONG Chat message exceeds 255 characters in length

Behavior

  • This will trigger VP_EVENT_CHAT for those who have subscribed to it. See vp_event_set().
  • 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