From 3c494e82de29401b1baae84be66a30b807ff0776 Mon Sep 17 00:00:00 2001 From: kepler155c Date: Thu, 28 Sep 2017 06:33:43 -0400 Subject: [PATCH] bugssss... --- apps/mwm.lua | 3 +-- apps/treefarm.lua | 4 +++- etc/scripts/obsidian | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/mwm.lua b/apps/mwm.lua index b8ff113..5b0dee1 100644 --- a/apps/mwm.lua +++ b/apps/mwm.lua @@ -5,8 +5,7 @@ local Util = require('util') local function syntax() printError('Syntax:') - print('mwm sessionName [monitor]') - error() + error('mwm sessionName [monitor]') end local args = { ... } diff --git a/apps/treefarm.lua b/apps/treefarm.lua index 1490bb6..cb0d74d 100644 --- a/apps/treefarm.lua +++ b/apps/treefarm.lua @@ -466,7 +466,9 @@ local function randomSapling() table.insert(ALL_SAPLINGS, slot.key) end end - sapling = ALL_SAPLINGS[math.random(1, #ALL_SAPLINGS)] + if #ALL_SAPLINGS > 0 then + sapling = ALL_SAPLINGS[math.random(1, #ALL_SAPLINGS)] + end end return sapling diff --git a/etc/scripts/obsidian b/etc/scripts/obsidian index 2695af1..a0e985a 100644 --- a/etc/scripts/obsidian +++ b/etc/scripts/obsidian @@ -44,7 +44,7 @@ local function findObsidian() end end - if turtle.getCount(16) > 0 then + if turtle.getItemCount(16) > 0 then print('Inventory full') print('Enter to continue...') read()