You could put the receive command inside a program and run it inside a loop, because when you do it in prompt and hit the enter key, the message is not sended yet, so there is nothing received and therefore the message is nil. The message has to be sendet in the same time the receive happens. Better would be a prog with a pull event checking for "rednet_message" , making you able to check for other event-types such as keypresses, monitor touches, mouse clicks and whatever, but you can also leave a standard loop when the message is received.
If i got that right now, there are 3 values received over rednet, not 2. SenderID, message and the distance of the sender…
yes, however when i run
Sender, Message = redner.receive()
and on the lua prompt on the other computer i type:
rednet.send(2, "hello")
but when i go back to the first computer and do
print(Message)
it returns hello
also, because i'm not using the distance value, i don't need a variable for it
i cant see what the problem is because it works the other way. the code is for a remote auth program (server validates logins from clients)
i added debug code, when the username and password are entered, they are added to a table, which is then serialized and sent
i can see on the server that it received it, validated it then constructed a new table to send back the reply, which is another serialized table thats sent back, but this second table never seems to reach the client. i just get "attempt to concatenate string and nil" on the receive, meaning the server never sent it to begin with, hence the first post which actually explains what i did to try to see where the problem was