Posted 05 July 2013 - 06:28 PM
I have coding using openperipherals but i need it to update the amount of liquid thats in the tank endlesly if i take it out or put it in i need it to tell me the amount it has
this is the code i have now
all i want is for the amount in the tank to auto update and i cant figure out how please help
thanks
this is the code i have now
local lava = peripheral.wrap("iron_tank_valve_2")
local lavatank = lava.getTanks("unknown")
if not lavatank[1].amount then
lavatext = "Lava: Empty"
else
lavatext = "Lava: "..tostring(lavatank[1].amount).."/"..tostring(lavatank[1].capacity)
end
term.clear()
term.setCursorPos(1,1)
print(lavatext)
sleep(0.5)
all i want is for the amount in the tank to auto update and i cant figure out how please help
thanks