147 posts
Location
My Computer
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
3057 posts
Location
United States of America
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.
57 posts
Location
Universe:C:/MilkyWay/Sol/Earth/Europe/Germany
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
147 posts
Location
My Computer
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