Int x keeps going back to default

I have no idea how to explain this in the title. Fatigue…

#include <Tone.h>

Tone tone1;
int x = 0;

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

void loop()
{
  if (Serial.read() > 0);
    x = Serial.read();
  tone1.play(x);
  Serial.println(x);
}

When I use this program, I type in x through serial, but then it keeps reseting back to 0.
Try it.

How do I set it so it will keep at what I set x to (lets say 100) and stay at 100, until I change it to another number?

if (Serial.read() > 0);

So that statement does nothing, no colon after this but a {

 if (Serial.read() > 0);

I think you meant:

 if (Serial.Available() > 0)[ /code]

And as Mike pointed out, the semi-colon is incorrect too.  This is a good reason to always be in the habit of using braces on if-statements even if it legal to leave them out...