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

Open Peripherals (Pushintoslot), Need Code Example

Started by IceCrasher, 06 October 2013 - 07:35 AM
IceCrasher #1
Posted 06 October 2013 - 09:35 AM
Hey guys

I looked at the wiki from openperipherals (http://www.openperip...n/vanilla/chest) and i really tried hard for about 2 hours using the push and pull commands even the pushintoslot and pullintoslot. I got no error but it just returns 0 and no single item moves. I also searched in youtube and in google for a solution but found none. A simple example of a working code would help me a lot.

Thank you for your responses.
Cranium #2
Posted 06 October 2013 - 11:35 AM
Split into new topic.

Don't hijack another topic to ask your own question. You have enough posts to be able to create your own topic.
DerKoch #3
Posted 06 October 2013 - 08:13 PM
I have a PIM with a Computer besides and a Chest underneath it
And thats how I use the PIM to remove something from the player- inventory and push it into the chest:
	pIM.pushIntoSlot(chest, 39, 1, 0)
	pIM.pushIntoSlot(chest, 38, 1, 1)
	pIM.pushIntoSlot(chest, 37, 1, 2)
	pIM.pushIntoSlot(chest, 36, 1, 3)
Where:

1. parameter:
chest = "down"
2. parameter
39 = Player Slot for Helmet
38 = Player Slot for Armor
37 = Player Slot for Leggings
36 = Player Slot for Boots
3. parameter
1 = amount that should be transfered
4. parameter
Ths targeted slot, starting with 0 (upper-left slot) to getInventorySize() - 1 (bottom-right slot)
Either there is something wrong with your setup (no adjacent inventory to push to/pull from) or you didn't start with index 0, that was my fault when playing around with openperipherals inventories.
IceCrasher #4
Posted 07 October 2013 - 02:25 PM
That was totally my problem! Thank you a lot :)/>

(This topic can be closed now:)