Difference between revisions of "Turtle.transferTo"
From ComputerCraft Wiki
(added from version) |
(more detail on behavior) |
||
Line 6: | Line 6: | ||
|api=turtle | |api=turtle | ||
|addon=ComputerCraft | |addon=ComputerCraft | ||
− | |desc=Transfers items from the selected slot to the specified slot in the quantity given. | + | |desc=Transfers items from the selected slot to the specified slot in the quantity given. If the destination slot already has items of a different type, return false (does not try to fill the next slot, like suck() would). If there are fewer than Quantity items in the selected slot or only room for fewer items in the destination slot, transfers as many as possible and returns true. If none can be transferred, returns false. |
|examples= | |examples= | ||
{{Example | {{Example |
Revision as of 04:24, 13 November 2012
Function turtle.transferTo | |
Transfers items from the selected slot to the specified slot in the quantity given. If the destination slot already has items of a different type, return false (does not try to fill the next slot, like suck() would). If there are fewer than Quantity items in the selected slot or only room for fewer items in the destination slot, transfers as many as possible and returns true. If none can be transferred, returns false. | |
Syntax | turtle.transferTo(slot, quantity) |
Returns | bool "success" |
Part of | ComputerCraft |
API | turtle |
Examples
Example | |
Transfers 32 items from the selected slot to slot 6. | |
Code |
turtle.transferTo(6, 32) |
This function came available in version 1.45