Posted 30 September 2012 - 01:46 PM
SO happy to see that a computer is in minecraft. Just found out two days ago. I already have many ideas for this game :)/>/>
The point of this little test program is to turn the redston coming from the back of the computer on or off depending on the message. If the message is for the computer than turn redstone on if not and redstone is on then turn redstone off. The computers ID is 2 while the computers ID I'm sending information from is 3
The problem it's not going into the if statement at all. It just loops back to "waiting…". This is the code I'm sending it
The point of this little test program is to turn the redston coming from the back of the computer on or off depending on the message. If the message is for the computer than turn redstone on if not and redstone is on then turn redstone off. The computers ID is 2 while the computers ID I'm sending information from is 3
rednet.open("right")
state = true
while state == true do
write("waiting...")
id, message = rednet.receive()
message = tonumber(message)
if message = os.computerID then
rs.setOutput("back", true)
elseif rs.getInput("back") == true then
rs.setOutput("back", false)
end
end
The problem it's not going into the if statement at all. It just loops back to "waiting…". This is the code I'm sending it
rednet.open("right")
rednet.send(2,"2")