Difference between revisions of "Turtle.select"

From ComputerCraft Wiki
Jump to: navigation, search
(Created page with "{{lowercase}} {{Function |name=turtle.select |args= |api=turtle |returns=boolean whether the slot number specified is greater than nine or not. |addon=ComputerCraft |desc=...")
 
Line 2: Line 2:
 
{{Function
 
{{Function
 
|name=turtle.select
 
|name=turtle.select
|args=
+
|args=[[int (type)|int]] slotNumber
 
|api=turtle
 
|api=turtle
 
|returns=[[boolean]] whether the slot number specified is greater than nine or not.
 
|returns=[[boolean]] whether the slot number specified is greater than nine or not.
Line 10: Line 10:
 
{{Example
 
{{Example
 
|desc=Selects the specified slot
 
|desc=Selects the specified slot
|code=print(turtle.select())
+
|code=print(turtle.select(5))
|output=true unless slot number specified is greater than nine
+
|output=true
 
}}
 
}}
 
}}
 
}}

Revision as of 08:12, 30 May 2012


Grid Redstone.png  Function turtle.select
Attempts to select the specified slot.
Syntax turtle.select(int slotNumber)
Returns boolean whether the slot number specified is greater than nine or not.
Part of ComputerCraft
API turtle

Examples

Grid paper.png  Example
Selects the specified slot
Code
print(turtle.select(5))
Output true