Difference between revisions of "Turtle.compareTo"
From ComputerCraft Wiki
m (Moved to CAT:LuaCoreFunctions) |
(Corrected mapping from "Boolean" to "Boolean (type)") |
||
Line 4: | Line 4: | ||
|args=slot | |args=slot | ||
|api=turtle | |api=turtle | ||
− | |returns=[[boolean]] true if the selected item matches the one in the specified slot. | + | |returns=[[boolean_(type)|boolean]] true if the selected item matches the one in the specified slot. |
|addon=ComputerCraft | |addon=ComputerCraft | ||
|desc=Detects if the block in the specified slot is the same as the one in the selected Slot. | |desc=Detects if the block in the specified slot is the same as the one in the selected Slot. |
Revision as of 13:48, 30 November 2012
Function turtle.compareTo | |
Detects if the block in the specified slot is the same as the one in the selected Slot. | |
Syntax | turtle.compareTo(slot) |
Returns | boolean true if the selected item matches the one in the specified slot. |
Part of | ComputerCraft |
API | turtle |
Examples
Example | |
Detects if the item in the selected slot is the same as the one in the specified slot. | |
Code |
turtle.compareTo(2) |