Can somebody explain to me why this code:
bool turnedLeft = false;
bool turnedRight = false;
unsigned long lastChange = 0;
void setup() { }
void loop()
{
if(turnedLeft || turnedRight)
{
lastChange = millis();
if(turnedLeft) { }
else if(turnedRight) { }
}
}
Results in the following error ?
testerror.cpp:5:1: error: expected unqualified-id before 'else'
else if(turnedRight);
Maybe its just too late in the day, but I can’t see why this should happen ^^
Also is there a way to see what testerror.cpp contains ? I guess its precompiled from “testerror.ino”.
SOLUTION: https://community.spark.io/t/really-strange-compilation-error/10126/2