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()

void loop()
  if ( > 0);
    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 ( > 0);

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

 if ( > 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...