Multiuser Lingo Dictionary > Multiuser Lingo Dictionary > sendMessage() |
![]() ![]() ![]() |
sendMessage()
Syntax
whichServerMovie
.sendMessage(string/listRecipient
, "system.script.subject
",messageContents
{,errorCode
{,protocolFlag
{,stringSenderID
}}} )whichServerGroup
.sendMessage(string/listRecipient
, "system.script.subject
",messageContents
{,errorCode
{,protocolFlag
{,stringSenderID
}}} )whichServerUser
.sendMessage( "system.script.subject
",messageContents
{,errorCode
{,protocolFlag
{,stringSenderID
}}})
Description
Multiuser Server server-side command; sends a message from within a server-side script to the specified movie, group, or user.
When sending messages to a movie, the protocolFlag
, errorCode
, and stringSenderID
are optional, but when used must be appear together and in the correct order. The protocolFlag
is intended for future enhancements to the server and should be set to FALSE
.
When sending a message to a user with the third syntax shown, the recipient parameter is omitted, since the specified user is the recipient.
The subject must begin with "system.script."
to ensure that responses to the message are sent back to the server-side script.
This command is similar to sendNetMessage()
, which is used in client movies.
Example
The following statement sends a message from the server-side script to the user Bob in the movie ChessMovie informing him that his opponent's rook has moved three squares forward. The error code is 0, the protocolFlag
is FALSE
and the senderID
is the opponent whose name is John.
errCode = ChessMovie.sendMessage("Bob", "system.script.movePiece", ["Rook", 3, 0], 0, FALSE, "John")
See also
![]() ![]() ![]() |