Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

parmort

Members
  • Content Count

    2
  • Joined

  • Last visited

Posts posted by parmort

  1. 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?

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.