27 posts
Posted 22 March 2012 - 02:31 PM
im busy with a code for a mail system and these lines are for sending and i think its not good
rednet.open("left")
send = write("to: ")
message = write("message:")
write("to: ")
write("message: ")
rednet.send(send,message)
any help?
473 posts
Location
Poland
Posted 22 March 2012 - 02:43 PM
rednet.open("left")
write("to: ")
send = tonumber(read("to: "))
write("message: ")
message = read("message:")
rednet.send(send,message)
454 posts
Location
London
Posted 22 March 2012 - 02:44 PM
I'm not sure what you're trying to do with write, but I think this will do something close to what you're trying:
write("To: ")
local target = tonumber(read())
write("nMessage: ")
local message = read()
rednet.send(target, message)
27 posts
Posted 22 March 2012 - 02:59 PM
it works now i understand the code!
74 posts
Location
Australia
Posted 23 March 2012 - 07:29 AM
I'm not sure what you're trying to do with write, but I think this will do something close to what you're trying:
write("To: ")
local target = tonumber(read())
write("\nMessage: ")
local message = read()
rednet.send(target, message)
with your code i can send messages to other computers with my server?