Quote: "You never assign any value to 'x'. It stays zero all the time."
^correct
Quote: "I changed it to "y", but it still stayed zero. "
The name of the variable wasn't the problem.
What is the number for the person to guess? It's "x", right? Well, what is "x" equal to? You need to set x equal to something. For example, x=5 would set x equal to 5. The number to guess would be 5. x=rnd(50) would set x equal to any number from 0 to 50, and the player would have to guess that number. Right now, because you never give "x" a value, it is equal to 0 because that is the default behavior for that type of variable.
Bottom line, write "x= (insert number here)" somewhere in your program before the player starts guessing!