i get this some times, not sure what causes it, but I just copy the main body of the code on a different competition template, and reconfigure motors and that fixes it
(Edit: make sure you aren’t missing any } before trying this)
That means you’re missing a curly bracket somewhere, and the unhelpful part of the error is doesn’t say where it thinks it needs to be, just what line it realised you were missing it. Somewhere in the 120 lines before
main() a curly bracket is missing.
This. To be more clear, you are missing a
} somewhere above the code that you sent.