Posted 19 June 2012 - 05:24 AM
ok, so im just starting with this and i made a very simple program that i named "run". It fills in an area while also practicing with functions.
The code that i wrote reads as this:
go() = function()
turtle.forward()
end
low = function()
turtle.down()
end
put = function()
turtle.placeDown()
end
up = function()
turtle.up()
end
left = function()
turtle.turnLeft()
end
row = function()
x = 0
while x < 18 do
go()
put()
x = x + 1
end
low()
row()
x = x - 18
go()
put()
left()
go()
put()
left()
row()
x = x - 18
up()
go()
left()
go()
left()
Now, my problem is that an error pops up saying bios:206: [string "run"] :1: unexpected symbol.
any ideas?
i've looked over it again and again and can't figure it out.
it's a pretty simple code and it shouldn't be this hard but i can't figure it out.
please help.
The code that i wrote reads as this:
go() = function()
turtle.forward()
end
low = function()
turtle.down()
end
put = function()
turtle.placeDown()
end
up = function()
turtle.up()
end
left = function()
turtle.turnLeft()
end
row = function()
x = 0
while x < 18 do
go()
put()
x = x + 1
end
low()
row()
x = x - 18
go()
put()
left()
go()
put()
left()
row()
x = x - 18
up()
go()
left()
go()
left()
Now, my problem is that an error pops up saying bios:206: [string "run"] :1: unexpected symbol.
any ideas?
i've looked over it again and again and can't figure it out.
it's a pretty simple code and it shouldn't be this hard but i can't figure it out.
please help.