This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
MulticolouredMarshmellow's profile picture

Modem/Rednet update help

Started by MulticolouredMarshmellow, 22 February 2013 - 09:46 AM
MulticolouredMarshmellow #1
Posted 22 February 2013 - 10:46 AM
I think I need some help with the new modem update.
What I am having trouble with is how to send/receive? I have tried this:

Spoilercomputer 1:

  modem.open(1)
  local receiver = {os.pullEvent("modem_message")}
  for k,v in pairs(receiver) do
	print(v)
  end

computer 2:

  modem.open(1)
  modem.transmit(1, 2, "hello world")

What am I doing wrong?
Does computer 1 have to do something else to receive it?
Does computer 2 have to do something else to send it?
Is it both?

And Yes, i started computer 2 after computer 1.
Bubba #2
Posted 22 February 2013 - 11:25 AM
Did you wrap the peripheral first? If not, you need to add this in the code for both computers:

local modem = peripheral.wrap("top")
Replace "top" with whatever side your modems are on.


What problems are you experiencing exactly? It's difficult to help if we don't know what the problem is.
MulticolouredMarshmellow #3
Posted 23 February 2013 - 06:14 AM
Yes I did wrap it, but it seems to just not send. computer 1 doesn't receive it or computer 2 doesn't send it
ChunLing #4
Posted 23 February 2013 - 09:29 AM
Post the full code of both programs. Also, post exactly what shows on both computers, particularly computer 1.