Jump to content




[solved]I Keep Getting 'then' expected


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

#1 dw28394

  • Members
  • 84 posts

Posted 20 May 2012 - 04:31 PM

In Line 11 it say 'then' expected! i am trying to make a mining program for my turtle
print("User What Should I Call You?")
x = io.read()
print("Okay "..x.."")
print(""..x.." How Many Blocks Should I Mine Downward?")
y = io.read()
textutils.slowPrint("3..2..1")
print("Going Down!")
y = tonumber(y)
z = y

if y == 0 false then
turtle.digDown()
y = y - 1
end
if y == 0 then
turtle.up()
z - 1
end
if z == 0 then
os.shutdown()
end

EDIT-The Program is like what is you name? then how long down you want to dig? then digs down and comes up

#2 Teraminer

  • New Members
  • 175 posts
  • LocationDon't look behind you..

Posted 20 May 2012 - 05:00 PM

I think you need to put an end after z = y so like this:

Spoiler


#3 Cloudy

    Ex-Developer

  • Members
  • 2,543 posts

Posted 20 May 2012 - 06:25 PM

Line 11 has a random false after the if statement.

#4 MysticT

    Lua Wizard

  • Members
  • 1,597 posts

Posted 20 May 2012 - 06:28 PM

Change this:
if y == 0 false then
to this:
if y ~= 0 then






2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users