Discuss Scratch
- Discussion Forums
- » Questions about Scratch
- » Number of Variables Limit
- Austinato
-
Scratcher
1000+ posts
Number of Variables Limit
Hello Scratchers,
Currently, I am working on a new project that may require quite a few variables. These variables will not be cloud variables - and if there are any, there would be a small and/or reasonable amount. As for non-cloud variables, is there a limit on how many seperate variables there could be in a single project?
I only plan on using them for basic values, like 1-100 and a few with letters.
If you do answer, please give me a potential source for the answer!
Thanks for taking the time to read this,
Austinato
Currently, I am working on a new project that may require quite a few variables. These variables will not be cloud variables - and if there are any, there would be a small and/or reasonable amount. As for non-cloud variables, is there a limit on how many seperate variables there could be in a single project?
I only plan on using them for basic values, like 1-100 and a few with letters.
If you do answer, please give me a potential source for the answer!
Thanks for taking the time to read this,
Austinato
- ipushpeople
-
Scratcher
100+ posts
Number of Variables Limit
just use a list.
not sure if there is a limit or not, but if there is i'm sure it would be pretty high which will be a pain to work with
-D
not sure if there is a limit or not, but if there is i'm sure it would be pretty high which will be a pain to work with
-D
- footsocktoe
-
Scratcher
1000+ posts
Number of Variables Limit
50Mb is the project limit
How many variables you can have depends on how much other stuff you have.
If there was nothing but variables and each variable took up 50 bytes of memory, then you could have 1,000,000 variables.
How many variables you can have depends on how much other stuff you have.
If there was nothing but variables and each variable took up 50 bytes of memory, then you could have 1,000,000 variables.
- Austinato
-
Scratcher
1000+ posts
Number of Variables Limit
just use a list.
not sure if there is a limit or not, but if there is i'm sure it would be pretty high which will be a pain to work with
-D
50Mb is the project limitOkay, thanks for the help, both of you!
How many variables you can have depends on how much other stuff you have.
If there was nothing but variables and each variable took up 50 bytes of memory, then you could have 1,000,000 variables.
- MegaApuTurkUltra
-
Scratcher
1000+ posts
Number of Variables Limit
50Mb is the project limitDe facto the limit for project JSON is much lower (I think it's 10MB). You can try manually minifying them to squeeze more stuff in
How many variables you can have depends on how much other stuff you have.
If there was nothing but variables and each variable took up 50 bytes of memory, then you could have 1,000,000 variables.

If you go above the limit, Scratch won't warn you, just lag very heavily and say “network disconnected,” so be careful!
Last edited by MegaApuTurkUltra (July 1, 2016 22:41:12)
- Austinato
-
Scratcher
1000+ posts
Number of Variables Limit
Thanks again! I don't plan on making a project that big, but it's good to know!50Mb is the project limitDe facto the limit for project JSON is much lower (I think it's 10MB). You can try manually minifying them to squeeze more stuff in
How many variables you can have depends on how much other stuff you have.
If there was nothing but variables and each variable took up 50 bytes of memory, then you could have 1,000,000 variables.
If you go above the limit, Scratch won't warn you, just lag very heavily and say “network disconnected,” so be careful!

- Discussion Forums
- » Questions about Scratch
-
» Number of Variables Limit