Difference between revisions of "Turtle.inspectDown"
From ComputerCraft Wiki
MKlegoman357 (Talk | contribs) (Created page with "{{lowercase}} {{Function |name=turtle.inspectDown |args=[<nowiki/>{{type|number}} slotNum] |api=turtle |returns={{type|boolean}} success, {{type|table}} data/{{type|string}} e...") |
Magiczocker (Talk | contribs) m |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
{{Function | {{Function | ||
|name=turtle.inspectDown | |name=turtle.inspectDown | ||
− | |args= | + | |args= |
|api=turtle | |api=turtle | ||
|returns={{type|boolean}} success, {{type|table}} data/{{type|string}} error message | |returns={{type|boolean}} success, {{type|table}} data/{{type|string}} error message | ||
Line 19: | Line 19: | ||
* Returns false when there is nothing (air) below the Turtle. | * Returns false when there is nothing (air) below the Turtle. | ||
}} | }} | ||
+ | |||
+ | ==See also== | ||
+ | *[[turtle.inspect]] | ||
+ | *[[turtle.inspectUp]] | ||
+ | [[Category:API Functions]] |
Latest revision as of 07:59, 4 August 2020
Function turtle.inspectDown | |
Returns the ID string and metadata of the block below the Turtle in a table format: { name = "modname:blockname", metadata = 0 }. | |
Syntax | turtle.inspectDown() |
Returns | boolean success, table data/string error message |
Part of | ComputerCraft |
API | turtle |
Examples
Example | |
If there is a block below the turtle, prints it's name and metadata. | |
Code |
local success, data = turtle.inspectDown() if success then print("Block name: ", data.name) print("Block metadata: ", data.metadata) end |
Additional Notes
- Returns false when there is nothing (air) below the Turtle.