From f5231599a68102402e0fbf939bc5d944e8c241fc Mon Sep 17 00:00:00 2001 From: ubq323 Date: Thu, 29 Dec 2022 22:56:13 +0000 Subject: shop --- shop.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shop.lua b/shop.lua index 23ca0aa..c3c22b2 100644 --- a/shop.lua +++ b/shop.lua @@ -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 -- cgit v1.2.3