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

[Lua] [Question]

Started by FuzzyLitchi, 30 December 2012 - 04:16 AM
FuzzyLitchi #1
Posted 30 December 2012 - 05:16 AM
Any 1 know how/if it is posible to stop a program in the code, terminate the program in the code
KaoS #2
Posted 30 December 2012 - 05:30 AM
use return or error()
Cozzimoto #3
Posted 30 December 2012 - 06:19 AM
shell.exit()
or
os.reboot()
FuzzyLitchi #4
Posted 30 December 2012 - 07:00 AM
thanks :D/>
FuzzyLitchi #5
Posted 30 December 2012 - 07:13 AM
new problem


turtle.dig()
turtle.forward()
while true do
turtle.digUp()
turtle.up()
if turtle.detectUp() == false then
while true do
turtle.down()
if turtle.detectDown() == true then
turtle.turnRight()
turtle.turnRight()
turtle.forward()
turtle.turnRight()
turtle.turnRighht()
turtle.select(2)
turtle.place
turtle.select(3)
turtle.place
turtle.select(1)
return
end
end
end
end
remiX #6
Posted 30 December 2012 - 07:56 AM
new problem

–snip

What's the problem?

I see a problem with the code:
turtle.turnRighht(), line 14
should be turtle.turnRight(), was that the problem?
Kingdaro #7
Posted 30 December 2012 - 07:59 AM
And there are some lines where you forgot the (), e.g. on turtle.place, 7th and 9th line from the bottom.