expected unqualified id '.' token

I get that error message when trying to complile and I can’t figure out why?

The code is attached. Please help!

Flexcode.txt (510 Bytes)

compiles fine for me

int flexSensorPin = A0; //analog pin 0

void setup(){
  Serial.begin(9600);
}

void loop(){
  int flexSensorReading = analogRead(flexSensorPin); 

  Serial.println(flexSensorReading);

  //In my tests I was getting a reading on the arduino between 512, and 614. 
  //Using map(), you can convert that to a larger range like 0-100.
  int flex0to100 = map(flexSensorReading, 512, 614, 0, 100);
  Serial.println(flex0to100);

  delay(250); //just here to slow down the output for easier reading
}

And for me too, in Arduino V1.6.5.
@mjohnston0889, try again, and if you still get errors, enable verbose output, (>File >Preferences), and try once again, then post the full error message here, (between code tags </> of course). :slight_smile:
And the compiler will highlight the line that the error is on, so let us know which line, too.