It no longer works because it uses an old version of getTanks instead of getTankInfo. I am trying to revise it.
I created the following program to understand how the table works:
local valve = peripheral.wrap("bottom")
local tank = valve.getTankInfo("bottom")
for key, value in pairs(tank) do
print(key .. " = " .. tostring(value))
for a,b in pairs(value) do
print(a.." "..B)/>/>
end
end
It produces:
1 = table: 2aa0101 rawName Water amount 5600000 capacity 5600000 name water id 1
That pastebin code has the following:
local function tankStats(tank) if(tank) then local amt = tank["amount"] local size = tank["capacity"] local filled = (amt and 1 / (size / amt)) or 0 return amt, size, filled else return nil; end endand
local kind = tank["name"]
How do I get the information into that format appropriately? Obviously I will need to change:
local tank = valve.getTanks("back")[1]
to local tank = valve.getTankInfo("back")[1]
I don't think the











