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

Need help accessing Chest

Started by flagoss, 20 December 2014 - 07:41 PM
flagoss #1
Posted 20 December 2014 - 08:41 PM
Well I am using the latest Direwolf20 1.02 pack (Minecraft 1.7.10)

Using a Advenced Computer .I have been trying to simply acces chest inventory.
I have used many code exemple and everything seem to give a Trying to index a nil…

What code shoul I use to see if the chest on the bottom of the computer is accessible ?

This code:
testutils.serialize(peripheral.getMethods("bottom"))
give me : attempt to index ? (a nil value)
Lyqyd #2
Posted 20 December 2014 - 08:58 PM
The API you should be trying to use is textutils, not testutils. And it'll be easier to read if you do this instead:


textutils.pagedTabulate(peripheral.getMethods("bottom"))
flagoss #3
Posted 20 December 2014 - 09:22 PM
Well I just tried that little program from a tutorial:

local sides = { "top", "bottom", "left", "right",
"front", "back" }
for i = 1, #sides do
  if peripheral.isPresent(sides[i]) then
		print("Something is on the "..sides[i])
  end
end

My advanced computer only detect peripheral like Modem or Wireless Modem. Anything else is not detected. I tried Vanilla wooden chest, Gold Chest, Ender Chest….none is detected.

Thanks for pointing out the typo.

I just tried your code with chest around the computer and I get no result.
No message or no error.

Welll found the problem: OpenPeripheralIntegration is not includ in the latest DIrewolf20 modpack.

https://github.com/O...ddons/issues/39
Edited on 21 December 2014 - 01:32 AM