Send
This function sends a message to the connected server.
Syntax
- boolean Send(number message, Bank data, number channel=0, number flags=0)
- boolean Send(number message, string text, number channel=0, number flags=0)
Parameters
- message: user-defined message ID. This must be greater than zero.
- data: a bank containing the user-defined data to send over the network.
- text: a string of text to send, for example a chat message.
- channel: the channel to send the message over, used for sequencing packets.
- flags: optional parameter for flags which can include the following:
- Message.Reliable: this message has extra checks to make sure it is received successfully.
- Message.Ordered: messages on this channel will arrive in the order they are sent.
Returns
Returns true if the message was sent, otherwise false is returned.