local filename = "tobuild" rednet.open("left") while true do id, message, protocol = rednet.receive() if protocol == "getnexttobuild" then file = fs.open(filename,"r") line = file.readLine() restof = file.readAll() file.close() file = fs.open(filename,"w") file.write(restof) file.close() print(line) rednet.send(id,line,"nexttobuild") elseif protocol == "failedtobuild" then print(message.."failed") file = fs.open(filename,"r") restof = file.readAll() file.close() file = fs.open(filename,"w") file.writeLine(message) file.write(restof) file.close() end --file = fs.open(filename,"r") --print(file.readAll()) end