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

'end' expected.. [Solved]

Started by asto63, 02 July 2015 - 11:18 AM
asto63 #1
Posted 02 July 2015 - 01:18 PM
Hello guys, i've got a problem, i've coded a program, where verify a internet page…
But when i launched it, it said 'End' expected for end the line "10".
There is the pastebin of the code: http://pastebin.com/XfBr2rbH

And i can put 100 end, it will keep this error. Can someone help me plz ?
Edited on 02 July 2015 - 01:50 PM
Bomb Bloke #2
Posted 02 July 2015 - 03:35 PM
You have a "break" statement on line 15, exiting the "while" loop started on line 5, and making it impossible to reach the shell.run() call on line 16. The Lua interpreter expects an "end" to come immediately after a "break", so if you want to run code after exiting the loop, put that code under the loop.
asto63 #3
Posted 02 July 2015 - 03:49 PM
Ok nice, thank u guy, problem solved.