Difference between revisions of "Turtle.compareTo"
From ComputerCraft Wiki
Legomany3448 (Talk | contribs) (Created page with "{{lowercase}} {{Function |name=turtle.compareTo |args=slot |api=turtle |returns=boolean true if the selected item matches the one in the specified slot. |addon=ComputerCra...") |
(Adding "see also".) |
||
(5 intermediate revisions by 3 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
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) |