if statement help with >

Hey All,

I know this is a simple oversight, but i am newish to the micro-controller world and even newer to arduino.

So what i am trying to do is read a pressure sensor, which i have working. But i would like to keep and display the highest value the sensor reads. The below code does read the pressure and displays it but my highest pressure reading always equals my current pressure. I thought my if statement would only work if my pressure > Hpressue. Any help would be useful. Thanks all.

int pressureLvl = 0;
int pressurePin = A15;
int highestPressureLvl;
void setup() {
  // put your setup code here, to run once:
Serial1.begin(9600);
}

void loop() {
   pressureLvl = analogRead(pressurePin);
   if (pressureLvl > highestPressureLvl);
       {
          highestPressureLvl = pressureLvl;
       } 
   Serial1.write(0x0C);
   delay(5);
   Serial1.print("Pressure = ");
   Serial1.println(pressureLvl);
   Serial1.print("HPressure = ");
   Serial1.print(highestPressureLvl);
   delay(255);
   if (pressureLvl > highestPressureLvl);

That ; on the end forms the body of your if statement. Probably NOT what you want. Lose it.

PaulS:

   if (pressureLvl > highestPressureLvl);

That ; on the end forms the body of your if statement. Probably NOT what you want. Lose it.

That did it thank you very much!!!