rednet.isOpen
From ComputerCraft Wiki
Revision as of 06:33, 6 June 2014 by Bomb Bloke (Talk | contribs) (Parameter optional under CC 1.6.)
Function rednet.isOpen | |
Checks to see if the side's modem has been readied for rednet usage. If no side is specified then it returns whether any side has an open modem, though the parameter is not optional under versions of ComputerCraft prior to 1.6. | |
Syntax | rednet.isOpen([string side]) |
Returns | boolean isOpen, if the side has rednet opened it returns true, else false. |
Part of | ComputerCraft |
API | rednet |
Examples
Example | |
Checks if any side is opened, if so then tell the user. | |
Code |
for n,m in ipairs(rs.getSides()) do if rednet.isOpen(m) then print(m.." is open!") else print(m.." isn't open!") end end |
Rednet API Functions |
---|
rednet.open - rednet.close - rednet.send - rednet.broadcast - rednet.receive - rednet.isOpen - rednet.host - rednet.unhost - rednet.lookup |