Fix proto

This commit is contained in:
Dominic Zimmer 2020-07-05 13:03:38 +02:00
parent 372203d033
commit 048e393827

View File

@ -314,13 +314,18 @@ function waitForJob()
end end
end end
rednet.open("bottom") rednet.open("bottom")
rednet.broadcast("gibjob", "jobs") local retrying = false
while true do while true do
sender, message, proto = rednet.receive("newjob", 1) rednet.broadcast("gibjob", "jobs")
sender, message, proto = rednet.receive("newjob", 2)
if message then if message then
job = tonumber(message) job = tonumber(message)
print("Received job "..tostring(job)) print("Received job "..tostring(job))
return job return job
else
if not retrying then
print("No job received. I will keep retrying.")
end
end end
end end
end end