Posted 02 August 2012 - 12:55 AM
I've been trying to setup a communications network between my friend and I's Companies. Because the Modems only have a range of 64 meters, I am faced with a problem. I have made a method that theoretically will transfer the message from one computer to another down a line between the companies. However the only thing that I can't get to work(at the moment) is turing the original message into a variable, such as "x" and have it still be the same message at the other end.
Is this even possible? I've been trying for the majority of the day now, and have been met with no success.
Here is the code for the transfering.(there is a seperate version counting down rather than up for a message going the other direction)
And here is the code so far for turning it into a variable. (Not complete or working)
Any help is appreciated, Thanks in advance!
Is this even possible? I've been trying for the majority of the day now, and have been met with no success.
Here is the code for the transfering.(there is a seperate version counting down rather than up for a message going the other direction)
event, id, text = os.pullEvent()
if event == "rednet_message" then
x = rednet_message
j=os.computerID()
i=j
i=i+1
rednet.send(i,x)
end
And here is the code so far for turning it into a variable. (Not complete or working)
x = input()
j=computercraftID()
i=j
while i<5 do
i=i+1
rednet.send(i, x)
end
event, id, text = os.pullEvent()
if event == "rednet_message" then
print(id ..">"..text)
shell.run("IM")
Any help is appreciated, Thanks in advance!