diff options
-rw-r--r-- | shop.lua | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -38,7 +38,7 @@ function stock_amt() local out = 0 for i=1,16 do local x = turtle.getItemDetail(i) - if x.name == ITEM then out = out + x.count end + if x and x.name == ITEM then out = out + x.count end end return out end |