From 048e393827d4a0cf1b372cc589c0fbcdb2607175 Mon Sep 17 00:00:00 2001 From: Dominic Zimmer Date: Sun, 5 Jul 2020 13:03:38 +0200 Subject: [PATCH] Fix proto --- dominic/canemine.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dominic/canemine.lua b/dominic/canemine.lua index e1e4471..b34a28b 100644 --- a/dominic/canemine.lua +++ b/dominic/canemine.lua @@ -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