Closed dustpuppy closed 8 years ago
In my test it throws an error ("invalid slot"). "no slot selected" means that you called count() without arguments and the selected slot is invalid.
But you are right the slot index is one off. I will fix that.
Fix in version 1.6
Hi, i've found an error in the count() method. Not easy to explain :-) Source is :
local component = require("component") local cart = component.computercart for i = 1, cart.inventorySize() do print(i, cart.count(i)) end
The first slot (i=1) will give an error "no slot selected". So i did it from 2. Count is not starting at slot 1. It goes from slot 2 to inventorySize + 1. Possible picture will explain it better ;-)