Hello, I am newbie in Arduino and I try to make a robot commended by bluetooth

I use the variable x to exit from one function to another