so.. i've been looking around the net, and really cant find something that does as i wish, i've been trying and testing stuff, but cant get it to work
all i need is to read the amount and name from the tank, what i wrote is:
tank = peripheral.wrap("back")
tankInfo = tank.getTankInfo()
for k,v in pairs(tankInfo) do
for o,c in pairs(v) do
for a,b in pairs(c) do
print(a)
end
end
end
when i run it it returns with: testTwo:6: table expected, got number
and when i try to print Y, it returns with a string obv :b
when i do tank.getTankInfo() in the LUA it returns with:
{
{
capacity = 56000000
contents = {
rawName = "Lava",
amount = 256300
name = "lava",
id = 2,
},
},
}
what am i missing here? :s
all i really want it to do is:
Name:
Amount: x/capacity
EDIT: got it to print to only 1 monitor as i'd liked :D/>
But, it still wont update: pastebin is: http://pastebin.com/bPrRY9nZ