Posted 28 June 2015 - 09:49 PM
Recently I have been creating a large Rednet program. Everything has been working fine up until i got to the "receive" function.
I expected it to allow input for an integer which would determine the length at which the receive would last.
and afterwards for it to display the message and the id of the sending computer.
Instead, the computer goes into the receive state (the cursor disapears and waits for a message to receive.) except it ignores the duration set by the variable 'Num2', and lasts infinitely unless you terminate it. it also does not receive any messages that are sent to it.
if you have any further questions that would help i will answer them.
~survivalstevee
Code:
print("How long would like to Receive?")
Num2 = read()
local senderId, message, protocol = rednet.receive(Num2)
print(message)
print("sent from " .. senderId)
end
I expected it to allow input for an integer which would determine the length at which the receive would last.
and afterwards for it to display the message and the id of the sending computer.
Instead, the computer goes into the receive state (the cursor disapears and waits for a message to receive.) except it ignores the duration set by the variable 'Num2', and lasts infinitely unless you terminate it. it also does not receive any messages that are sent to it.
if you have any further questions that would help i will answer them.
~survivalstevee