Difference between revisions of "Turtle.compareTo"
From ComputerCraft Wiki
Legomany3448 (Talk | contribs) m |
(Adding "see also".) |
||
| (4 intermediate revisions by 2 users not shown) | |||
| 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 | + | |desc=Detects if the block in the specified slot is the same as the one in the selected Slot. |
|examples= | |examples= | ||
{{Example | {{Example | ||
|desc=Detects if the item in the selected slot is the same as the one in the specified slot. | |desc=Detects if the item in the selected slot is the same as the one in the specified slot. | ||
| − | |code=turtle.compareTo() | + | |code=turtle.compareTo(2) |
}} | }} | ||
}} | }} | ||
| + | |||
| + | ==See also== | ||
| + | *[[turtle.compare]] | ||
| + | *[[turtle.compareUp]] | ||
| + | *[[turtle.compareDown]] | ||
| + | |||
| + | [[Category:Lua_Core_Functions]] | ||
Latest revision as of 16:21, 22 April 2015
| 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
| Detects if the item in the selected slot is the same as the one in the specified slot. | |
| Code |
turtle.compareTo(2) |