peripheral.wrap
Allows you to use a peripheral’s functions at the specified side or network name.
|
|||
| Open the modem right of the computer/turtle. | |||
| Code | <nowiki>
local modem = peripheral.wrap("modem_1234")
rednet.open(modem)
</nowiki>
|
||
| Output | true | ||
Functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Lua |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CC:Tweaked |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| peripheral.wrap Function | |
|---|---|
|
Syntax peripheral.wrap(
| |
| Returns | boolean result |
| API | peripheral |
| Source | Lua (source) |
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.