- Sky
- Blueberry
- Slate
- Blackcurrant
- Watermelon
- Strawberry
- Orange
- Banana
- Apple
- Emerald
- Chocolate
- Charcoal
Twitchi
-
Content Count
2 -
Joined
-
Last visited
Posts posted by Twitchi
-
-
Hey guys, I have been learning Lua recently and have ran into a bit of an issue, every time I try to run the code bellow I get an error (missing end to close function) but no matter how many times I look at it, I see an end closing the function..
I'm sure I have made a massive error I just can't see it for all the looking
function walk() local clear = robot.detect() if clear == true then -- if block forward while clear == true do -- while it is true local upClear = robot.detectUp() if upClear == true then robot.up() -- fly up clear = robot.detect()--check forward again else if upClear == false then clear = false end --upclear end --while end --block forward robot.forward() --no obstical move forward local clearDown = robot.detectDown() --Check for ledge while clearDown == false do robot.down() clearDown = robot.detectDown() end -- while end -- function
any help is much appreciated as no amount of googling can find me an answer
also full paste if needed http://pastebin.com/5MEB99V5
why does it want an extra end?
in Programming
Posted
Thank you so very much
totally the type of thing I would never have seen myself