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

PyroRider

Members
  • Content Count

    2
  • Joined

  • Last visited

Posts posted by PyroRider

  1. On 12/9/2019 at 3:58 PM, SpaceBeeGaming said:

    First, why are you sleeping after event.pull() , that's unneccesary and could cause issues where a event is missed.

    Second, how are the computers connected (picture), Are the computers separated by a swich, is there a loop where the swich receives a packet twice (This is the most likely reason for duplicating messages.)

    the sleep was a try to prevent multiple network reading, didnt worked. The computers were connected only by cables, now everything is fine and working, i also built everything new. I believe i had the switch function in one of the racks activated so that may have caused the repetitions

  2. First my code on the receiving side:

    local component = require("component")
    local event = require("event")
    local m = component.modem
    m.open(1)
    print(m.isOpen(1))
    while true do
      local _, _, from, port, _, message = event.pull("modem_message")
      os.sleep(1)
      if message ~= "" then
        print("message")
      end
    end

    My problem is, I'm sending one broadcast ("Test") and a second later I'm sending a direct message ("Test2").

    The receiving server then prints out the broadcast nearly 8 times before the direct message gets repeated 6 times. From Google I know that this shouldn't be, but I can't figure out what I've done wrong.

    Heeeeeeeellllppppp XD

×
×
  • Create New...

Important Information

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