Hi.
I wrote a program that harvests sugarcane on demand (via modems). I have a main run loop, but the harvesting code runs twice per message received.
local event = require "event"
local running = true
-- ...
while running do
local _, _, _, port, _, message = event.pull("modem_message")
doHarvestRoutine() -- The bit that runs twice per event pull
print("Message: "..port.." "..tostring(message))
end
Any ideas why this is happening?