r/ComputerCraft • u/Xetch2950 • Aug 11 '25
a nil value error when attempting to use getItemDetails or getItemLimit on a chest
I am attempting to filter if an items has NBT data to keep them from entering my AE system to avoid corruption, but am getting an error when running a script I found in a video. I attempted to set the argument to a static value, but that did not resolve the error. The error states items.lua:8: attempt to call field 'getItemLimit' (a nil value) and the code in question is at https://pastebin.com/JqXL51Es for reference.
I also attempted just doing
local inputChest = peripheral.wrap("right")
inputChest.getItemLimit(1)
in a blank program to try and figure it out, but it gives me a similar error. Is there something else I need to know about those functions? This is in 1.12.2 Egnigmatica Expert 2.
1
u/SeriousPlankton2000 Aug 11 '25
You need to check the output of peripheral.wrap("right"). Probably it's thinking that the wrong side is "right" or you're trying to access the AE system directly
1
u/ShreksHellraiser Aug 12 '25
The absolute latest version of CC:T available for 1.12.2 is 1.89.2. According to https://tweaked.cc/generic_peripheral/inventory.html, the standard inventory peripheral was added in 1.94.0.
Long story short, you're not looking at the right documentation for the inventory API you're using. I think inventory management is provided by plethora in this version?