Program restart problem

Hello my friends,
This is the first time I encounter this case with Xojo.
I’m making a program with normal variables and arrays.
After running it once I stop it because it loops.
I have to quit and reopen it because the initial values ​​are incorrect.
Does anyone have an explanation for this?
Normally when running the program all values ​​should be reset to zero, right?

Can you show the code that is wrong or different? When pasting code please highlight it and press the </> button.

Are-you using static variable(s) ?
Save and restore variables to/from disk…

Ian, it’s not a huge program but when I get to the end, I’ll publish it here, it might be useful to some people.
Émile, I have been programming in Xojo for 14 years, I have never encountered this problem, I will try to finish that program and see if this problem persists but when I no longer have any errors.
My variables are classic with a few arrays, that’s all

If you have some code that declares variables and assigns values to them, then the program should startup exactly the same each time. That’s the nature of the programming. The only reason it could be different is if you didn’t quit the program fully between runs.

One other way of interpreting your request is that you setup your code one way and then saved it. When you reloaded it the code was different. I’ve never seen that happen. One way it could possible seem different is if you had two copies of the program and opened the wrong one?

Beyond that I don’t understand your question enough to help further, thus showing us what the “changes” where?