Posted 28 May 2014 - 01:39 AM
Hi.
I've a problem to communicate between 4 computers.
Here is the code on the "server" :
And the code on the 3 clients
When i quit and open the game, the 4 computers start automaticaly their programs (via startup)… and I receive only the message from the modem_id 103.
Does I did a mistake ?
Is there a limitation "1 channel to etablish a connection only between 2 computers, no more" ?
Regards
I've a problem to communicate between 4 computers.
Here is the code on the "server" :
local modem = peripheral.wrap("top")
modem.open(100)
local event, modemSide, senderChannel, replyChannel, message, senderDistance = os.pullEvent("modem_message")
print("I just received a message from: "..senderChannel)
print("I should apparently reply on: "..replyChannel)
print("The modem receiving this is located on the "..modemSide.." side")
print("The message was: "..message)
print("The sender is: "..senderDistance.." blocks away from me.")
And the code on the 3 clients
sleep(5);
local modem = peripheral.wrap("top")
modem_id=101 # 102 on the 2nd client and 103 on the 3rd client
modem.transmit(100, modem_id, "Hello world!")
When i quit and open the game, the 4 computers start automaticaly their programs (via startup)… and I receive only the message from the modem_id 103.
Does I did a mistake ?
Is there a limitation "1 channel to etablish a connection only between 2 computers, no more" ?
Regards
Edited on 27 May 2014 - 11:41 PM