summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2022-12-29 22:56:13 +0000
committerubq323 <ubq323@ubq323.website>2022-12-29 22:56:13 +0000
commitf5231599a68102402e0fbf939bc5d944e8c241fc (patch)
tree266406b7a628cd2713d68c7be2f627f49ef12702
parentcc01d3e86b750e1a64241b7eef0cef12c847857b (diff)
shop
-rw-r--r--shop.lua2
1 files changed, 1 insertions, 1 deletions
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