Difference between revisions of "Modem.transmit"

From ComputerCraft Wiki
Jump to: navigation, search
(Categorised page)
m (Expanded)
Line 1: Line 1:
 
{{Function
 
{{Function
|name=modem.transmit
+
|name=''modem''.transmit
|args={{type|int}} channel, {{type|int}} replyChannel, {{type|string}} message
+
|args={{type|number}} channel, {{type|number}} replyChannel, {{type|string}} message
 +
|returns={{type|nil}}
 
|api=Modem
 
|api=Modem
 
|addon=ComputerCraft
 
|addon=ComputerCraft
Line 8: Line 9:
 
{{Example
 
{{Example
 
|desc=Sends a message and a reply channel over the specified channel.
 
|desc=Sends a message and a reply channel over the specified channel.
|code=modem.transmit(1, 2, "Hello world!")
+
|code= local modem = [[peripheral.wrap]]("top")
 +
 +
modem.transmit(1, 2, "Hello world!")
 
}}
 
}}
 
}}
 
}}
  
 
[[Category:API_Functions]]
 
[[Category:API_Functions]]

Revision as of 15:56, 9 April 2014

Grid Redstone.png  Function modem.transmit
Sends a message and a reply channel over the specified channel.
Syntax modem.transmit(number channel, number replyChannel, string message)
Returns nil
Part of ComputerCraft
API Modem

Examples

Grid paper.png  Example
Sends a message and a reply channel over the specified channel.
Code
local modem = peripheral.wrap("top")

modem.transmit(1, 2, "Hello world!")