Posted 04 December 2013 - 05:17 PM
Hi.
I've create my own rednet receiving program and a sending program.
I've set it up like internet cables.
Everyone on my server has two computers, a send a receive computer.
I also have 2 computers but it is made for intercepting messages from other users, so basicly I can log the chat.
But it will only let me receive one message before ending.
I was wondering on how to repeat it.
I've look on youtube but didn't really find anything on making an infinite loop.
Here is the code:
Program name: receive
Code:
term.clear()
term.setCursorPos(1,1)
rednet.open("top")
print ("Waiting for new message…")
sleep(1)
id, msg, dis = rednet.receive()
print ("You have received a message from #"..id)
print ("The message came from "..dis.." blocks away")
print ("The message is :")
print ("———————–")
print (msg)
And that is where the code ends.
I want all this to happen, but for it to repeat infinitely so I can get everyone's chat.
Thanks.
I've create my own rednet receiving program and a sending program.
I've set it up like internet cables.
Everyone on my server has two computers, a send a receive computer.
I also have 2 computers but it is made for intercepting messages from other users, so basicly I can log the chat.
But it will only let me receive one message before ending.
I was wondering on how to repeat it.
I've look on youtube but didn't really find anything on making an infinite loop.
Here is the code:
Program name: receive
Code:
term.clear()
term.setCursorPos(1,1)
rednet.open("top")
print ("Waiting for new message…")
sleep(1)
id, msg, dis = rednet.receive()
print ("You have received a message from #"..id)
print ("The message came from "..dis.." blocks away")
print ("The message is :")
print ("———————–")
print (msg)
And that is where the code ends.
I want all this to happen, but for it to repeat infinitely so I can get everyone's chat.
Thanks.