Difference between revisions of "Peripheral.wrap"
From ComputerCraft Wiki
m (Moved to CAT:LuaCoreFunctions) |
m (My definition of "prints the name of the device" isn't "handle.shutdown()". :P) |
||
| Line 9: | Line 9: | ||
|examples= | |examples= | ||
{{Example | {{Example | ||
| − | |desc= | + | |desc=Shuts down the computer or turtle on the right side of the calling machine. |
|code=local handle = peripheral.wrap("right") handle.shutdown() | |code=local handle = peripheral.wrap("right") handle.shutdown() | ||
|output=Shuts down any computer to the right of the computer/turtle. | |output=Shuts down any computer to the right of the computer/turtle. | ||
}} | }} | ||
| − | |||
}} | }} | ||
[[Category:Lua_Core_Functions]] | [[Category:Lua_Core_Functions]] | ||
Revision as of 00:19, 29 November 2012
| Returns a handle to a peripheral that can then be used to call methods, as if using peripheral.call(side, method) | |
| Syntax | peripheral.wrap((string) side) |
| Returns | A handle to the peripheral on side. |
| Part of | ComputerCraft |
| API | peripheral |