Posted 06 August 2013 - 06:02 PM
I'm trying to make a program check for a rednet message and once it receives, it rechecks the second time and go to a different function.
Is this possible to make?
Also, sorry by my bad english :rolleyes:/>
function receive()
id, message = rednet.receive()
if message == 1 then
if line1 then
line1 = false
else
line1 = true
end
elseif message == 2 then
if line2 then
line2 = false
else
line2 = true
end
elseif message == "da" then
if da then
da = false
else
da = true
end
elseif message == "ds" then
if ds then
ds = false
else
ds = true
end
elseif message == "as" then
if as then
as = false
else
as = true
end
end
I have this code, but to be easier, I would like to run 2 times to give the first number and the second variable, like: First transmission: 1; Second transmission: asIs this possible to make?
Also, sorry by my bad english :rolleyes:/>