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

OpenPeripheral won't move items to inventories connected with a wired modem

Started by figgycity50, 21 December 2015 - 10:26 AM
figgycity50 #1
Posted 21 December 2015 - 11:26 AM
I'm trying to move items from slots in a player's inventory with a PIM and move it into an ME interface (both connected with Wired Modems)
This is my code:


local pim = peripheral.find("pim")
local interface = peripheral.find("tileinterface")
if pim and pim.getInventorySize() > 0 then
  --pim.condenseItems()
	    if interface then
		    for i=10, 35 do
			    pim.pushItem("tileinterface_0", i)
		    end
	    end

By the way, pim.condenseItems is commented out on purpose (so I can check it is taking all inventory slots I want it to).

I get this error when i use the code:


startup:7:Failed to convert arg 'direction', cause: ''tileinterface_0' is not valid enum value, must be [DOWN, UP, NORTH, SOUTH, WEST, EAST, UNKNOWN] or 1..7'
Hydrotronics #2
Posted 21 December 2015 - 11:41 AM
I don't think you can transfer items through wireless modems. Not sure though, haven't used openPeripherals in a while
figgycity50 #3
Posted 21 December 2015 - 11:44 AM
I don't think you can transfer items through wireless modems. Not sure though, haven't used openPeripherals in a while
I am using wired modems
Hydrotronics #4
Posted 21 December 2015 - 11:46 AM
i meant wired XD

but yeah i dont think u can do it through wireless either XD
Edited on 21 December 2015 - 10:46 AM
Dragon53535 #5
Posted 21 December 2015 - 11:54 AM
Yeah, you can't transfer items through modems, you can transfer them through the physical things, which is why you're getting the error you're getting.

It's looking for a direction to push the item in, and it will only take those directions, or unknown. Nothing more, nothing less.
Wojbie #6
Posted 21 December 2015 - 12:05 PM
There is a way to move items via wired modems but its added by CCtweaks to Openperiphreal so without it its not possible.