Jump to content




turtle.detect() help

turtle api lua

  • You cannot reply to this topic
2 replies to this topic

#1 protexxi

  • Members
  • 51 posts

Posted 18 October 2012 - 11:34 AM

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

is a a valid if statement
thanks

#2 Pharap

  • Members
  • 816 posts
  • LocationEngland

Posted 18 October 2012 - 11:51 AM

no, end needs to come after the else:

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


#3 JoshhT

  • New Members
  • 64 posts
  • LocationAustralia

Posted 18 October 2012 - 12:19 PM

View Postprotexxi, on 18 October 2012 - 11:34 AM, said:

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...





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users