#endif without #if
Here is the last part of the config file
// Servo deactivation
//
// With this option servos are powered only during movement, then turned off to prevent jitter.
//#define DEACTIVATE_SERVOS_AFTER_MOVE #endif
Seems pretty clear to me. Every #endif must have a matching #if that comes before it. This error indicates that is not the case with your code. It will be impossible for us to provide any further assistance unless you post the code.