I was making a program for my minecarts and then when i put this loop
local x = 15
if x = 15 and turtle.detect()==true
then do throwAway() -- this is one of my functions above, I know this works
else do turtle.detect()
When i run this it shows me the error
bios:14: [string ".temp"]:27: 'then' expected. if someone could help that would be awesome.
Issues with my program
Started by minerlogo, Nov 28 2015 08:46 PM
1 reply to this topic
#1
Posted 28 November 2015 - 08:46 PM
#2
Posted 28 November 2015 - 11:05 PM
Lua did not expect a single = to be used when parsing the conditional for your "if" statement. Use "x == 15" instead.
You'll likely also want to get rid of that redundant "do". "for" statements need 'em, but they're seldom useful otherwise.
You'll likely also want to get rid of that redundant "do". "for" statements need 'em, but they're seldom useful otherwise.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











