Discuss Scratch
- CompassesHelpMe
-
Scratcher
61 posts
Variables length
Whats the max length for a variable, and is it any different from a cloud variable?
- Oumuamua
-
Scratcher
1000+ posts
Variables length
Do this, set var to 1, then repeat one million set var to join (var) (var) and then, when finish, say length of var
Voilá
Voilá
- The_Imaginarium
-
Scratcher
1000+ posts
Variables length
Do this, set var to 1, then repeat one million set var to join (var) (var) and then, when finish, say length of varYou can always count on ou :{)
Voilá
I don’t believe there’s a known limit.
- Yusei-Fudo
-
Scratcher
1000+ posts
Variables length
I don’t believe there’s a known limit.IDK, Scratch Wiki says it's 10,240.
Voila!
- aw snap webpage picture -
Lol!
LOL!!







- Yusei-Fudo
-
Scratcher
1000+ posts
Variables length
IDK, Scratch Wiki says it's 10,240.
Apparently, that's not true, I made a variable and following the concept of Ou's suggestion, I'm able to make it 1,000,000 (one million)+ letters long
- Yusei-Fudo
-
Scratcher
1000+ posts
Variables length











I've probably exceeded the file size limit. So probably like Imaginarium said, there is no maxlength
- johandsa2020
-
Scratcher
100+ posts
Variables length
it crashes scratch when it exceeds the limit this script will crash it (only if the variable is visible) btw dont try it…
idk the exact limit
when green flag clicked
set [variable] to [1]
show variable [variable]
repeat (1000000)
set [variable] to (join (variable) (variable))
end
hide variable[variable]
idk the exact limit
Last edited by johandsa2020 (Aug. 3, 2021 07:35:10)
- Oumuamua
-
Scratcher
1000+ posts
Variables length
I'd ssy tje limit is the RAM memory your device has.
Greets
Greets
- MasterofTheBrick
-
Scratcher
1000+ posts
Variables length
The Wiki states that the limit is around 10,240, so it could be more or less than that.
Was the project able to save though?IDK, Scratch Wiki says it's 10,240.
Apparently, that's not true, I made a variable and following the concept of Ou's suggestion, I'm able to make it 1,000,000 (one million)+ letters long
- Oumuamua
-
Scratcher
1000+ posts
Variables length
Since lists can hold 200.000 items i don't think that vars cannot store 200.000 chars at least..
I could be probedly wrong, of course.
I could be probedly wrong, of course.
- CompassesHelpMe
-
Scratcher
61 posts
Variables length
Cloud variables hold max 256 digits each.No, its def more than 256. 256 can't crash a computer.
- Oumuamua
-
Scratcher
1000+ posts
Variables length
Cloud variables hold max 256 digits each.No, its def more than 256. 256 can't crash a computer.
Actually cloud vars are capped to 256
- scratchusername40
-
Scratcher
1000+ posts
Variables length
The limit is probably whatever your ram can hold
- CompassesHelpMe
-
Scratcher
61 posts
Variables length
Ohh, they meant cloud variables.Cloud variables hold max 256 digits each.No, its def more than 256. 256 can't crash a computer.
Actually cloud vars are capped to 256
I thought they meant regular.
So regular have no known limit, only your computer's power (Edit: or maybe scratch's file size?) , and cloud variables have a limit of 256!
Thanks all :)
Last edited by CompassesHelpMe (Aug. 3, 2021 16:14:27)

