now im using 2 seperate computers both with wireless modems as test dummies. right now i have my code to prompt the user to type in their message, then they are prompted to put in the ID to be sent to.
it seems i cant get the program to read the number thats punched for the ID or im entering the ID wrong(?) the 24 i know signifies the line of code thats bugged.
here is that line:
id = to number (id)
if need be ill learn how to add spoilers and put the whole script in.
the purpose of this thread was for one problem and now i feel like im flooding :X
i dont see many email threads up for this kind of program so im going to post my code WiP that needs some major help lol.
im now stuck at getting the message to load on the other computer. as far as i know its sending now but i cant receive, i think that part of my code needs work.
Spoiler
function clear()
term.clear()
term.setCursorPos(1,1)
end
clear()
rednet.open("back") -- side the modem is on.
print("1. Send message")
print("2. Wait for message")
print("3. Exit program")
while true do
event, key = os.pullEvent("char")
if key == "1" then
clear()
write("Message: ")
text = read()
write("ID to send to: ")
id = read()
id = tonumber(read())
rednet.send( id, message)
print("Message sent")
sleep(1)
shell.run("email")
elseif key == "2" then
clear()
print("waiting for message")
print("press enter to abort")
while true do
event, param1, param2 = os.pullEvent()
if event == "rednet_message" then
print("ID "..param1..": "..param2)
shell.exit()
elseif event == "char" and param1 == "enter" then
write("Aborted")
shell.exit
end
end
elseif key == "3" then
print("Exiting program")
shell.exit()
end
end