modem.isPresentRemote
From ComputerCraft Wiki
Revision as of 23:13, 10 January 2016 by Bomb Bloke (Talk | contribs) (Created page with "{{lowercase}} {{Function |name=''modem''.isPresentRemote |args={{type|string}} peripheralName |returns={{type|boolean}} present |api=Modem |addon=ComputerCraft |desc=Tells you...")
Function modem.isPresentRemote | |
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
Example | |
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". |