How to fix Function Definition is not allowed?

Functions are not allowed in robot config, you would have to place it in the main competition code.

This is not true, in fact there is a function in robot-config.cpp by default

As for the OP’s question, it looks like you probably have that function inside another function, which isn’t allowed. move the second closing curly brace which is at the end of the file to wherever it’s supposed to be.

3 Likes