modem.transmit

From ComputerCraft
Jump to navigation Jump to search

modem.transmit
Function
Syntax
modem.transmit()
Returns nil
API modem

Sends a modem message to a certain channel. If the modem is wired this will queue a modem_message event on all computers connected to the wired network that have the specified channel open. If the modem is wireless it will queue a modem_message event on all computers in range that have the specified channel open.

Note Note: To send a message the channel it is being sent from does not need to be open.

ExampleExampleSend a message on channel 42
Sends a "Hello World" on channel 42.
Code
local modem = peripheral.find("modem")
modem.transmit(42, 43, "Hello World")