This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
duffdunker's profile picture

[Open Peripherals] pushItem/pushItemIntoSlot - what went wrong?

Started by duffdunker, 12 May 2014 - 04:43 PM
duffdunker #1
Posted 12 May 2014 - 06:43 PM
Hey,

i have an advanced computer with a single vanilla chest on the left and one on the right side. The right chest is my source and full of planks. Now i want to move one plank from slot 1 to the chest on the left side which is north of the computer. My code:


chest = peripheral.wrap("right") -- source chest with planks
target = "north" -- empty target chest position relativ to the computer

chest.pushItem( target, 1, 1)

As response i got a '0' which means no items were moved. But what went wrong? I tried it with a turtle, with pushItemIntoSlot, different chest positions, the other way around with pullItem etc.

Using ComputerCraft 1.58, with OpenPeripherals Core 0.33 & ModsLib 0.4b

maybe someone can dip my nose on the problem,

greets

duffdunker
Lyqyd #2
Posted 12 May 2014 - 07:32 PM
I don't really use OpenPeripheral, but I believe the item movement functions are intended to be used to push/pull items to and from the peripheral inventory and another inventory directly adjacent to that peripheral. In your example, the peripheral chest is trying to push items into the computer itself, which has no inventory.
duffdunker #3
Posted 12 May 2014 - 08:10 PM
Oh dear, you are right. :(/>

The whole time in had in mind, that a computer has a internal transfer slot for that. Maybe from an older version or misunderstand something else. Thanks :)/>
Dog #4
Posted 12 May 2014 - 08:30 PM
You're not imagining things, duffdunker - there is a mod by ElvishJericho that gives computers a single internal buffer slot.
Edited on 12 May 2014 - 07:30 PM