From 4f82df6dbb0594d06d9b69b3ec00774d3ca0355a Mon Sep 17 00:00:00 2001 From: justuswolff Date: Thu, 19 Feb 2026 20:03:27 +0100 Subject: [PATCH] fix an bug where we couldnt index an stack properly --- src/main.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main.lua b/src/main.lua index ef77ff7..5fc2c63 100644 --- a/src/main.lua +++ b/src/main.lua @@ -677,11 +677,12 @@ local function VP_splitstack(_stack, x) end local out = { - height=height + height=height, + stacks={} } - if #unevenstack > 0 then table.insert(out,unevenstack) end + if #unevenstack > 0 then table.insert(out["stacks"],unevenstack) end for _,v in pairs(stacks) do - table.insert(out,v) + table.insert(out["stacks"],v) end return out end @@ -902,11 +903,11 @@ while true do stacks = VP_splitstack(stacks, expam+1) -- plus 1 because we also build as the master turtle. for i,v in pairs(accepted) do reset() - print("ID "..tostring(v).." needs "..VP_calccost(stacks[i], stacks["height"],dimensions["x"],dimensions["z"]).." blocks.") + print("ID "..tostring(v).." needs "..VP_calccost(stacks["stacks"][i], stacks["height"],dimensions["x"],dimensions["z"]).." blocks.") print("Please ensure that turtle has that many blocks and press enter to continue.") read("") rednet.send(v, { - stack=stacks[i], + stack=stacks["stacks"][i], dimensions=dimensions }, "HB_vprint_pairacknowledge") end