Difference between revisions of "Rednet.isOpen"
From ComputerCraft Wiki
(rfjukmgh) |
m (Reverted edits by 199.19.105.156 (talk) to last revision by AfterLifeLochie) |
||
| Line 1: | Line 1: | ||
| − | + | {{lowercase}} | |
| + | {{Function | ||
| + | |name=rednet.isOpen | ||
| + | |args=[[string]] side | ||
| + | |returns=[[boolean_(type)|boolean]] isOpen, if the side has rednet opened it returns true, else false. | ||
| + | |api=rednet | ||
| + | |addon=ComputerCraft | ||
| + | |desc=Checks to see if the side has rednet opened. | ||
| + | |examples= | ||
| + | {{Example | ||
| + | |desc=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 | ||
| + | }} | ||
| + | }} | ||
| + | |||
| + | [[Category:API_Functions]] | ||
Revision as of 17:10, 4 December 2012
| Checks to see if the side has rednet opened. | |
| 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
| 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
|