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

<eof> expected

Started by mrpoopy345, 27 June 2015 - 02:55 PM
mrpoopy345 #1
Posted 27 June 2015 - 04:55 PM
I am trying to build a koth style bot competition. At the beginning of my run function, I have all the ways the bots can win/lose. After adding a new elseif statement, I get the error 70:<eof> expected near end. I know this means too many ends (Or code after a loop break, but I have no "break" in that function) but whenever I remove an end it says end expected. My source code (I doubt you will need all of it, mainly just look at the run function)
http://pastebin.com/JaQLVRWZ
Edited on 27 June 2015 - 02:56 PM
KingofGamesYami #2
Posted 27 June 2015 - 05:19 PM
Your script has a number of compile time errors.

I fixed the first error by removing an end on line 67. This worked, but now there's a missing end later in the file. I fixed that too, and it gives me an error of trying to get length of a global variable, which is nil.
Square789 #3
Posted 27 June 2015 - 05:24 PM
Ok, i guess i fixed it.
1.Remove end at line 67.
2.Add end somewhere around line 177.

I hope I helped you ;)/>

Edit: Why do you always ninja me?

Edit2:After fixing some variables by setting them to 0, it just prints something like Bot1 B, Bot2 A all over the screen
and crashes due to a missing sleep(0)
Edited on 27 June 2015 - 03:30 PM
mrpoopy345 #4
Posted 27 June 2015 - 05:25 PM
The reason it is giving you that error is because I accidentally didn't post the whole code, sorry. Could you tell me where you removed that missing end later in the file?

EDIT: Got it, thanks for the help!
Edited on 27 June 2015 - 03:25 PM