peripheral.getType
Returns the type of peripheral attached at the specified side or network name. Returns nil when no peripheral is attached at the specified side or network name.
|
|||
| Gets and prints the type of peripheral attached to the top side. | |||
| Code | print(peripheral.getType("top"))
|
||
| Output | If a wireless modem was attached, the output would be 'modem'. | ||
Functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Lua |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CC:Tweaked |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| peripheral.getType Function | |
|---|---|
|
Syntax peripheral.getType(
| |
| 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.