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

turtle.detect() help

Started by protexxi, 18 October 2012 - 10:34 AM
protexxi #1
Posted 18 October 2012 - 12:34 PM
any know if

if turtle.detect() then
<action here>
end
else
<action here>

is a a valid if statement
thanks
Pharap #2
Posted 18 October 2012 - 12:51 PM
no, end needs to come after the else:


if turtle.detect() then
<action here>
else
<action here>
end
JoshhT #3
Posted 18 October 2012 - 01:19 PM

if turtle.detect() then

end
else

end

Why have I seen this same mistake three times in the last 12 hours? O_o
'sabit weird…