modem.isPresentRemote
From ComputerCraft Wiki
| Tells you whether a peripheral is currently connected to the Wired Modem. Note that peripheral.isPresent() can do the same for all peripherals attached to the computer, through modems or otherwise. | |
| Syntax | modem.isPresentRemote(string peripheralName) |
| Returns | boolean present |
| Part of | ComputerCraft |
| API | Modem |
Examples
| Outputs whether a peripheral is detected under the specified network name. | |
| Code |
local modem = peripheral.wrap("top") -- Or whichever side the modem is connected to. print( modem.isPresentRemote( "printer_0" ) ) |
| Output | "true" if a peripheral called "printer_0" is connected to the modem, otherwise "false". |