Difference between revisions of "Turtle.digUp"

From ComputerCraft Wiki
Jump to: navigation, search
(Corrected mapping from "Boolean" to "Boolean (type)")
m (Fixed)
Line 2: Line 2:
 
{{Function
 
{{Function
 
|name=turtle.digUp
 
|name=turtle.digUp
|args=
 
 
|api=turtle
 
|api=turtle
|returns=[[boolean_(type)|boolean]] whether the turtle succeeded in digging.
+
|returns={{type|boolean}} did the turtle dig the block?
 
|addon=ComputerCraft
 
|addon=ComputerCraft
 
|desc=Attempts to dig the block above of the turtle.
 
|desc=Attempts to dig the block above of the turtle.
Line 10: Line 9:
 
{{Example
 
{{Example
 
|desc=Digs the block above the turtle.
 
|desc=Digs the block above the turtle.
|code=print(turtle.digUp())
+
|code=print('''turtle.digUp()''')
 
|output=true if the turtle could dig the block, false if it could not or no block present.
 
|output=true if the turtle could dig the block, false if it could not or no block present.
 
}}
 
}}

Revision as of 16:41, 10 April 2014


Grid Redstone.png  Function turtle.digUp
Attempts to dig the block above of the turtle.
Syntax turtle.digUp()
Returns boolean did the turtle dig the block?
Part of ComputerCraft
API turtle

Examples

Grid paper.png  Example
Digs the block above the turtle.
Code
print(turtle.digUp())
Output true if the turtle could dig the block, false if it could not or no block present.