Open
Description
In Scratch 2.0, projects can sometimes have a global and local variable have the same name and type. This breaks monitors and and variable behavior in 3.0.
Resolve these conflicts when importing 2.0 projects:
Solution:
- If the stage and a sprite have a variable of the same name and type, rename the sprite variables to avoid conflicts with the stage variable. This maintains 2.0 behavior where the sprites that had the conflict could only access their local variable anyways. Only sprites without a name conflict could access the global variable.
Repro
- Create a local variable in scratch 2 sprite
- Share that reporter to the stage by dragging
- Click on that variable block in the stage
- Open that project in 3.0