Posted 06 September 2012 - 10:25 PM
Hey guys, I just have a question to ask about having a rednet.send working within a program.
This is my code for it so far.
The program is supposed to send the specified message to the ID entered. The problem I am having with it is that I can't figure out how to get the data from the read's into the rednet.send. I have the prints there just to test that the read's are working, if I remove the dashes after i have entered the ID and message It will print the things I entered so I know the reads are working.
Basicly I just need to know how I could get the data from id = read () and msg = read () into the rednet.send().
This is my code for it so far.
while true do
print("Enter the ID of the person you want to send to")
id = read ()
break
end
while true do
print("Enter the message you want to send")
msg = read ()
break
end
while true do
--print(id)
--print(msg)
Shell.run(rednet.send(id, "msg"))
break
end
The program is supposed to send the specified message to the ID entered. The problem I am having with it is that I can't figure out how to get the data from the read's into the rednet.send. I have the prints there just to test that the read's are working, if I remove the dashes after i have entered the ID and message It will print the things I entered so I know the reads are working.
Basicly I just need to know how I could get the data from id = read () and msg = read () into the rednet.send().