I wrote a simple tower building script/program, it works, but then I thought " I'm going to use this code a lot" so I started an Inventory.lua filled with functions no scripting of its own.
If I run this I get attempt to index upvalue 'Inventory' (a boolean value)
Inventory.lua
local robot = require ("robot")
slot = 1
function nextFull()
if robot.count(slot) == 0 then
slot = slot + 1
robot.select(slot)
end
end
build.lua
local tArgs = {...}
local length = tonumber(tArgs[1])
local width = tonumber(tArgs[2])
local height = tonumber(tArgs[3])
local robot = require ("robot")
loca