Posted 15 March 2012 - 01:26 AM
Hello,
maybe this is a really stupid question but I have been using Lua for only two days now. what I want to do is run both:
id, message = Rednet.receive()
local name = io.read()
together at the same time. can anyone help me with this? this is my full code:
maybe this is a really stupid question but I have been using Lua for only two days now. what I want to do is run both:
id, message = Rednet.receive()
local name = io.read()
together at the same time. can anyone help me with this? this is my full code:
rednet.open("right")
output = "back"
redstone.setOutput(output, true)
while true do
id, message = rednet.receive(3)
local name = io.read()
if name == "unlock" then
redstone.setOutput(output, false)
end
if name == "lock" then
redstone.setOutput(output, true)
end
if message == "unlock" then
redstone.setOutput(output, false)
end
if message == "lock" then
redstone.setOutput(output, true)
end
end