`swap-local-global`: Cannot change cloud variables to non-cloud variables · Issue #9132 · ScratchAddons/ScratchAddons · GitHub
Skip to content

swap-local-global: Cannot change cloud variables to non-cloud variables #9132

Open

Description

@KR0K0BIL

Description

The swap-local-global addon does not work for cloud variables.
For example, I wan't to edit a "☁ test" variable, in the following line defaultValue is "test", so it doesn't find the "☁ test" variable and variable is null.


This leads to the following error:
Uncaught (in promise) TypeError: Cannot read properties of null (reading 'type') at addMoreOptionsToPrompt

Steps to reproduce

  1. create a new scratch project or open an existing one (with "Variable type switching" on)
  2. create a new cloud variable or find an existing one (the var starts with "☁ ")
  3. right click -> "Rename or edit variable"
  4. there are no edit options

Demonstration(s) and additional context

Image Image

Environment

Browser: Chrome + Safari
Scratch Addons version: 1.45.2
Operating system: MacOS

Activity

  1. added
    type: bugA bug in the addon loader, or in a specific addon
    status: needs triageNeeds triaging by putting relevant labels
    on Jul 30, 2026
  2. added theissue type on Jul 30, 2026
  3. added
    scope: addonRelated to one or multiple addons
    and removed
    status: needs triageNeeds triaging by putting relevant labels
    on Jul 30, 2026
  4. DNin01 commented on Jul 31, 2026

    @DNin01
    Member

    Cloud variables can only be global variables, so it is intentional that there are no options for them. However, I wouldn't have expected this to cause an error in the console.

  5. changed the title [-]Can't edit cloud variables[/-] [+]`swap-local-global`: Error when attempting to edit cloud variables[/+] on Jul 31, 2026
  6. KR0K0BIL commented on Jul 31, 2026

    @KR0K0BIL
    Author

    Cloud variables can only be global variables, so it is intentional that there are no options for them.

    The menu should show the same options as for creating a new variable with the cloud option checked and the other two (global/local) disabled and set to global.
    In turbowarp, you can edit cloud variables.
    There are a few reasons why editing cloud variables could be useful:

    • I accidentally made a cloud variable
    • I'd like to know if a variable is a cloud variable or a normal variable with cloud emoji
    • it is confusing that there are no options
      Example: I've made a cloud variable "Highscore", but now I want this to be no longer a cloud variable to store the highscore in another cloud variable, for example encoded together with the username.
  7. DNin01 commented on Jul 31, 2026

    @DNin01
    Member

    Oh, do you mean converting a variable between cloud and non-cloud?

  8. KR0K0BIL commented on Jul 31, 2026

    @KR0K0BIL
    Author

    Yes, I want to convert a cloud variable to a non-cloud variable (global) and maybe even local. You can do this in turbowarp.

    Image
  9. changed the title [-]`swap-local-global`: Error when attempting to edit cloud variables[/-] [+]`swap-local-global`: Cannot change cloud variables to non-cloud variables[/+] on Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope: addonRelated to one or multiple addonstype: bugA bug in the addon loader, or in a specific addon

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions