Difference between revisions of "Modem.close"
From ComputerCraft Wiki
MKlegoman357 (Talk | contribs) m (Expanded) |
MKlegoman357 (Talk | contribs) m (Added 'local modem = peripheral.wrap("top")') |
||
Line 9: | Line 9: | ||
{{Example | {{Example | ||
|desc=Closes channel 1. | |desc=Closes channel 1. | ||
− | |code= modem.close(1) | + | |code= local modem = [[peripheral.wrap]]("top") |
+ | |||
+ | modem.close(1) | ||
print("Channel 1 is now closed and is no longer used for listening.") | print("Channel 1 is now closed and is no longer used for listening.") | ||
|output=Channel 1 is now closed and is no longer used for listening. | |output=Channel 1 is now closed and is no longer used for listening. |
Latest revision as of 15:46, 9 April 2014
Function modem.close | |
Closes the specified channel. | |
Syntax | modem.close(number channel) |
Returns | nil |
Part of | ComputerCraft |
API | Modem |
Examples
Example | |
Closes channel 1. | |
Code |
local modem = peripheral.wrap("top") modem.close(1) print("Channel 1 is now closed and is no longer used for listening.") |
Output | Channel 1 is now closed and is no longer used for listening. |