Fix proto
This commit is contained in:
parent
372203d033
commit
048e393827
@ -314,13 +314,18 @@ function waitForJob()
|
||||
end
|
||||
end
|
||||
rednet.open("bottom")
|
||||
rednet.broadcast("gibjob", "jobs")
|
||||
local retrying = false
|
||||
while true do
|
||||
sender, message, proto = rednet.receive("newjob", 1)
|
||||
rednet.broadcast("gibjob", "jobs")
|
||||
sender, message, proto = rednet.receive("newjob", 2)
|
||||
if message then
|
||||
job = tonumber(message)
|
||||
print("Received job "..tostring(job))
|
||||
return job
|
||||
else
|
||||
if not retrying then
|
||||
print("No job received. I will keep retrying.")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user