I have a very simple code, but when I compile I keep getting syntax errors. Unfortunatly, the MPLAB does not tell you anything but that there is a syntax error. I've been trying to debug it, and it seems to be either the "void Autonomous_1()" line, or the IF loop. It seems like it should work, and multiple people have checked it and agreed. Does anybody see something that I'm not? It's so simple, I don't understand why it won't work. Thanks.
Code:
if (rc_dig_in01)
{
Autonomous_1();
}
else
{
Autonomous_2();
}
void Autonomous_1()
{
pwm01 = 254;
pwm02 = 254;
}
void Autonomous_2()
{
pwm01 = 127;
pwm02 = 127;
}