Difference between revisions of "Modem.open"
From ComputerCraft Wiki
(Categorised page) |
MKlegoman357 (Talk | contribs) m (Expanded) |
||
| Line 1: | Line 1: | ||
{{Function | {{Function | ||
| − | |name=modem.open | + | |name=''modem''.open |
| − | |args={{type| | + | |args={{type|number}} channel |
| + | |returns={{type|nil}} | ||
|api=Modem | |api=Modem | ||
|addon=ComputerCraft | |addon=ComputerCraft | ||
| Line 7: | Line 8: | ||
|examples= | |examples= | ||
{{Example | {{Example | ||
| − | |desc=Opens | + | |desc=Opens channel 1 to allow listening for messages. |
| − | |code=modem.open(1) | + | |code= modem.open(1) |
| + | print("Channel 1 is now opened for listening.") | ||
| + | |output=Channel 1 is now opened for listening. | ||
}} | }} | ||
}} | }} | ||
[[Category:API_Functions]] | [[Category:API_Functions]] | ||
Revision as of 15:38, 9 April 2014
| Opens the specified channel to allow listening for messages. | |
| Syntax | modem.open(number channel) |
| Returns | nil |
| Part of | ComputerCraft |
| API | Modem |
Examples
| Opens channel 1 to allow listening for messages. | |
| Code |
modem.open(1)
print("Channel 1 is now opened for listening.")
|
| Output | Channel 1 is now opened for listening. |