Variables stopped working after copying blocks to another screen

As my new program gets bigger I save it more and more.
I wonder if making many copies could do the following.
I noticed this error, which doesn’t affect performance but thought I might post it.
The orange has “Band1_4” but the selection bar has Band_4.
It has since “settled down” and both have “Band1_4”
On a different screen, the opposite happened, but I didn’t take a screenshot of it.
And it too has “settled down” and has “Band_4” only now
Untitled

Hello @peterjamesleniq
Thank you for sharing this issue.
Could you please share how you created this app variable?
Did you duplicate another variable or a screen?

1 Like

Damn, things have gotten a little worse.

Yep, I copied a large chunk of code from one screen to another.
And this time, all my Screen 4 (S4) variables have been deleted and replaced with Screen 1 (S1) variables.
Yesterday, I changed all the variables on each screen, putting S1, S2, S3 and S4 on all the variables of each different screen, hoping it would resolve the issue.
But all my Screen 4 variables are now have S1 in front of them instead of S4.

I just went back and deleted the copied code to see what would happen.
And refreshed, all my S4 variables came back and the S1 chunk of code also came back(it was grey and still is), but the variables are all ok now, they are all S4 again.

Now the problem has come back again.

I refreshed it and it went away. I think it’s because I still have the chunk of code from Screen one (in grey) still on screen 4.


I stopped copying screens because of issues with variables getting duplicated or not working. One workaround I came up with is to only initialize variables on a single screen so that when I copy a screen, it doesn’t copy any of the initialize blocks. That works better but it’s not how I like to code so it’s not a great solution.

1 Like

Yep, I did that a little too that.
But will next time.

One thing I have noticed is, when I duplicated the whole project, all the issues disappeared.
Hopefully that is the case all the time.