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

Problem :461: 'end' expected

Started by Heisenbugs, 11 January 2013 - 10:20 PM
Heisenbugs #1
Posted 11 January 2013 - 11:20 PM
When trying to run my program I get the error: bios:206: [string "mine"]:461: 'end' expected (to close 'if' at line 17). Sounds simple, but for the life of me I can't see where I need close the if. Also, this is my first attempt at a real program so I'm sure the code is messy and the pinnacle of inefficiency. Sorry. :/
theoriginalbit #2
Posted 11 January 2013 - 11:29 PM
line 417 you have else if change it to elseif
Luanub #3
Posted 11 January 2013 - 11:29 PM
You need to put an end in for the if statement on line 17 prior to starting the functon keepmain1() on line 55.
theoriginalbit #4
Posted 11 January 2013 - 11:32 PM
You need to put an end in for the if statement on line 17 prior to starting the functon keepmain1() on line 55.
nah he has one for it… look at the end of the file…
remiX #5
Posted 12 January 2013 - 02:40 AM
line 417 you have else if change it to elseif

Yeah, that's the problem.

Also, you're using 'keepmain1' as a function and a variable, when you set keepmain1 to read() you will not be able to call the function again unless you re-define it.
Heisenbugs #6
Posted 12 January 2013 - 01:11 PM
Thanks guys. :)/>