This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Dustybee's profile picture

Turtle Door not working

Started by Dustybee, 23 February 2013 - 11:21 PM
Dustybee #1
Posted 24 February 2013 - 12:21 AM
title: Turtle Door not working



rednet.open("right")

rednet.receive()

if msg == "Dustybee" then
turtle.digUp()
turtle.up()
turtle.digUp()
turtle.up()
turtle.digUp()
turtle.down()
turtle.down()
turtle.down()
turtle.placeUp()
sleep(6)
turtle.digUp()
turtle.Up()
turtle.placeUp()
turtle.down()
turtle.placeUp()
turtle.down()
end




when i right click on the Player Detector on top the remote Computer the turtle is terminated
Lyqyd #2
Posted 24 February 2013 - 04:32 PM
You aren't catching the return values from rednet.reveive(). Therefore msg is always nil and your if never executes. Replace your rednet.receive call with `local id, msg = rednet.receive()`.