Discuss Scratch

Yummyhi1
Scratcher
32 posts

What are the limits for cloud variables? [Solved]

I'm having a bit of trouble with cloud variables and usually I don't, so if anyone could let me know if any new limits were made or there are character length limits.

The project im having trouble with is here: https://scratch.mit.edu/projects/579474952/

Last edited by Yummyhi1 (Oct. 7, 2021 12:54:54)

meepeygamer567
Scratcher
500+ posts

What are the limits for cloud variables? [Solved]

As I never used cloud variables I’d suggest asking here.
Yummyhi1
Scratcher
32 posts

What are the limits for cloud variables? [Solved]

Thanks but i don't need help with the script, I just want to know the limits so I can adjust to them.

But I will ask there if no one responds here.
Wei-ern_520
Scratcher
500+ posts

What are the limits for cloud variables? [Solved]

Yummyhi1 wrote:

Thanks but i don't need help with the script, I just want to know the limits so I can adjust to them.

But I will ask there if no one responds here.
How long is your value in your cloud variable? Remember, only numbers can be allowed in cloud variables.
Yummyhi1
Scratcher
32 posts

What are the limits for cloud variables? [Solved]

Wei-ern_520 wrote:

Yummyhi1 wrote:

Thanks but i don't need help with the script, I just want to know the limits so I can adjust to them.

But I will ask there if no one responds here.
How long is your value in your cloud variable? Remember, only numbers can be allowed in cloud variables.


I would say it's very long.
There are no letters, it's just a very long number.

Is there a character limit?
--Explosion--
Scratcher
1000+ posts

What are the limits for cloud variables? [Solved]

Yes, there is a character limit, which is 256 characters. These characters can also only be numbers. See this wiki page for more information
Yummyhi1
Scratcher
32 posts

What are the limits for cloud variables? [Solved]

--Explosion-- wrote:

Yes, there is a character limit, which is 256 characters. These characters can also only be numbers. See this wiki page for more information


Thanks, I will check my code to see if it goes above the limit.
If it does not then I will please ask you to check my code for me.
I will also look at the wiki.
Yummyhi1
Scratcher
32 posts

What are the limits for cloud variables? [Solved]

--Explosion-- wrote:

Yes, there is a character limit, which is 256 characters. These characters can also only be numbers. See this wiki page for more information


Yea i think the limit is the problem, Thanks.
--Explosion--
Scratcher
1000+ posts

What are the limits for cloud variables? [Solved]

Yummyhi1 wrote:

--Explosion-- wrote:

Yes, there is a character limit, which is 256 characters. These characters can also only be numbers. See this wiki page for more information


Thanks, I will check my code to see if it goes above the limit.
If it does not then I will please ask you to check my code for me.
I will also look at the wiki.
I'm not sure if I will have time to check your code for you, but you can make your code check! Simply split the data you're trying to store into multiple cloud variables (E.g. “data 1”, “data 2”, etc, you can have up to 10)

To do this you can use something like this:


(Credit to this project)

Then you can set your cloud variables as follows:

define Set cloud
Set SubString to letters (0) to (256) of (data)::custom //Where data is the long variable you're trying to store
set [data 1 v] to (SubString)
Set SubString to letters (256) to (512) of (data)::custom //Where data is the long variable you're trying to store
set [data 2 v] to (SubString)
Set SubString to letters (512) to (768) of (data)::custom //Where data is the long variable you're trying to store
set [data 3 v] to (SubString)
//Etc etc etc for however much you need to store

Last edited by --Explosion-- (Oct. 7, 2021 12:56:16)

Yummyhi1
Scratcher
32 posts

What are the limits for cloud variables? [Solved]

--Explosion-- wrote:

Yummyhi1 wrote:

--Explosion-- wrote:

Yes, there is a character limit, which is 256 characters. These characters can also only be numbers. See this wiki page for more information


Thanks, I will check my code to see if it goes above the limit.
If it does not then I will please ask you to check my code for me.
I will also look at the wiki.
I'm not sure if I will have time to check your code for you, but you can make your code check! Simply split the data you're trying to store into multiple cloud variables (E.g. “data 1”, “data 2”, etc, you can have up to 10)

To do this you can use something like this:


(Credit to this project)

Then you can set your cloud variables as follows:

define Set cloud
Set SubString to letters (0) to (256) of (data)::custom //Where data is the long variable you're trying to store
set [data 1 v] to (SubString)
Set SubString to letters (256) to (512) of (data)::custom //Where data is the long variable you're trying to store
set [data 2 v] to (SubString)
Set SubString to letters (512) to (768) of (data)::custom //Where data is the long variable you're trying to store
set [data 3 v] to (SubString)
//Etc etc etc for however much you need to store




Thanks but I am going to use a simple 1 block fix lol

wait (0.5) secs


I wont reply to this anymore sorry.
Bye bye

Last edited by Yummyhi1 (Oct. 7, 2021 12:58:06)

Powered by DjangoBB