peripheral.isPresent

From ComputerCraft Wiki
Revision as of 18:48, 29 November 2012 by AfterLifeLochie (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Grid Redstone.png  Function peripheral.isPresent
Tells you whether a peripheral is present on a side of the computer or the turtle.
Syntax peripheral.isPresent((string) side)
Returns boolean whether a peripheral is present on side.
Part of ComputerCraft
API peripheral

Examples

Grid paper.png  Example
Prints true if a peripheral is detected on the computer's right side.
Code
print(peripheral.isPresent("right"))
Output true if a peripheral is attached to the computer's right side, false if nothing was detected on the computer's right side.
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox