Discuss Scratch

Helmentloo
Scratcher
80 posts

Cloud Variable reset to old value when browser is refreshed. [CLOSED]

Why is the cloud variable of my game kept getting reset to old values when the game is reloaded by browser reset?

https://scratch.mit.edu/projects/992150436/

Update: The issue has been resolved. With the assistance of MrKingofScratch, we identified that the introduction of the new cloud variable feature more than 12 days ago has altered the behavior of cloud variables. Specifically, cloud variables can no longer retrieve values stored by the last record. Instead, when a project is reloaded, it reverts to the cloud value saved at the last save point. This change impacts the functionality of high-score features in Scratch projects, rendering them inoperative.

Another update: The Cloud variable is working normally again a few days ago. It can now save high-score.

Last edited by Helmentloo (April 5, 2024 03:41:32)

deck26
Scratcher
1000+ posts

Cloud Variable reset to old value when browser is refreshed. [CLOSED]

Assuming you're not resetting the cloud variable you may be trying to access the cloud variable too soon after the project starts. The project holds another version of the cloud variable which is used if there is no cloud link or the person running the project does not have Scratcher status.

I would allow at least half a second before asking the project to access the cloud variable and certainly before trying to update it.
Helmentloo
Scratcher
80 posts

Cloud Variable reset to old value when browser is refreshed. [CLOSED]

Hi deck26, thank you for the help. Unfortunately, I added wait even up to 10 seconds and it is still not working. The project still always use its saved cloud variable value. I continuously read the cloud variable still and can’t access to the cloud’s latest value like forever during first game after browser reload.
deck26
Scratcher
1000+ posts

Cloud Variable reset to old value when browser is refreshed. [CLOSED]

Are you checking the cloud data log? One variable is certainly being set frequently (check you're not doing that without allowing 0.1 seconds between cloud variable updates, even to different variables) but another cloud variable far less often - I haven't checked to see how many you have.
MrKingofScratch
Scratcher
100+ posts

Cloud Variable reset to old value when browser is refreshed. [CLOSED]

There's only one and it maxes out at 77 chars. I checked the project and can only find two times that the cloud var is set. So it would have to be issues with the encoding or smth.

Last edited by kaj (Tomorrow 00:00:00)
100th post!
MrKingofScratch
Scratcher
100+ posts

Cloud Variable reset to old value when browser is refreshed. [CLOSED]

Really strange… check out https://scratch.mit.edu/projects/992675590/ where I added a test cloud variable. use left and right arrows to change it. however, when you reload the page, it doesn't save. Are any cloud vars working at the moment?

Last edited by kaj (Tomorrow 00:00:00)
100th post!
LIZARD_OFFICIAL
Scratcher
100+ posts

Cloud Variable reset to old value when browser is refreshed. [CLOSED]

MrKingofScratch
Scratcher
100+ posts

Cloud Variable reset to old value when browser is refreshed. [CLOSED]

Strange thing is that when duplicating the tab the cloud var will start a 0 but will update when it gets changed on another tab so ig it just has to be constantly updated? (this would make it so that when there's no players on the cloud var will be reset)

Last edited by kaj (Tomorrow 00:00:00)
100th post!
Malicondi
Scratcher
1000+ posts

Cloud Variable reset to old value when browser is refreshed. [CLOSED]

MrKingofScratch wrote:

Strange thing is that when duplicating the tab the cloud var will start a 0 but will update when it gets changed on another tab so ig it just has to be constantly updated? (this would make it so that when there's no players on the cloud var will be reset)
renaming the cloud variable(s) then saving the project fixes the problem.

post #1000 post #100 i help in the forums post #1 post #500 0 second ninja
I recommend reading jvvg's essay about the scratch team before complaining, as it may change your opinion and provide insight on the topic.

coming soon :)


Helmentloo
Scratcher
80 posts

Cloud Variable reset to old value when browser is refreshed. [CLOSED]

Thanks everyone for trying to help! I tried renaming it to “Troubled_Cloud” and the problem is still there.
Helmentloo
Scratcher
80 posts

Cloud Variable reset to old value when browser is refreshed. [CLOSED]

It looks like it is a bug. It is in this bug report forum: https://scratch.mit.edu/discuss/topic/469469/?page=1
Helmentloo
Scratcher
80 posts

Cloud Variable reset to old value when browser is refreshed. [CLOSED]

Thanks to MrKingofScratch's help. This issue has been resolved. We identified that the introduction of the new cloud variable feature more than 12 days ago has altered the behavior of cloud variables. Specifically, cloud variables can no longer retrieve values stored by the last record. Instead, when a project is reloaded, it reverts to the cloud value saved at the last save point. This change impacts the functionality of high score features in Scratch projects, rendering them inoperative.
-stxllxr
New to Scratch
100+ posts

Cloud Variable reset to old value when browser is refreshed. [CLOSED]

Helmentloo wrote:

Thanks to MrKingofScratch's help. This issue has been resolved. We identified that the introduction of the new cloud variable feature more than 12 days ago has altered the behavior of cloud variables. Specifically, cloud variables can no longer retrieve values stored by the last record. Instead, when a project is reloaded, it reverts to the cloud value saved at the last save point. This change impacts the functionality of high score features in Scratch projects, rendering them inoperative.
Thou is stating false.
(This isn't true, there are various cloud variable projects still working, new and old. Certain projects have issues where their cloud variables aren't saving their updates properly, and can be solved by renaming the variable and saving the project, repeating as necessary.)
Helmentloo
Scratcher
80 posts

Cloud Variable reset to old value when browser is refreshed. [CLOSED]

@Stxllxr, please show me one project that still can record high score. I would like to find out too.
MrKingofScratch
Scratcher
100+ posts

Cloud Variable reset to old value when browser is refreshed. [CLOSED]

TLDR: rename it like 3 times
So I tried renaming once and it didn't work. However, I kept renaming it until eventually it worked! Thanks to everyone who suggested renaming, and special thanks to @-stxllxr who pointed out that we should try it multiple times!

Last edited by kaj (Tomorrow 00:00:00)
100th post!
Helmentloo
Scratcher
80 posts

Cloud Variable reset to old value when browser is refreshed. [CLOSED]

@MrKingofScratch

If you have a project that has successfully renamed and work. Please do share it here. I would like to see it.

Thank you.
medians
Scratcher
1000+ posts

Cloud Variable reset to old value when browser is refreshed. [CLOSED]

-stxllxr wrote:

Helmentloo wrote:

Thanks to MrKingofScratch's help. This issue has been resolved. We identified that the introduction of the new cloud variable feature more than 12 days ago has altered the behavior of cloud variables. Specifically, cloud variables can no longer retrieve values stored by the last record. Instead, when a project is reloaded, it reverts to the cloud value saved at the last save point. This change impacts the functionality of high score features in Scratch projects, rendering them inoperative.
Thou is stating false.
(This isn't true, there are various cloud variable projects still working, new and old. Certain projects have issues where their cloud variables aren't saving their updates properly, and can be solved by renaming the variable and saving the project, repeating as necessary.)
No, it has happened to new projects as well. I'm trying to make a test project right now to see
Edit: It still happens:
https://scratch.mit.edu/projects/993179455/

Last edited by medians (April 1, 2024 23:40:27)


:D: 2.0 is 11 years old https://scratch.mit.edu/projects/1018259409/
Medians bamboozled by 3.0 (version 3.0): https://scratch.mit.edu/projects/979822351/
hi875230163394: You're similar to valve in that you both hate a certain number…
Scratch 0.x, 1.x, 2.x, 3.x and LogoBlocks Archives
Bamboozlement: https://scratch.mit.edu/studios/33739789
Years on internet: 15 (soon 16)
medians: Oh god not this utc - 12 thing again..
Fun_Cupcake_i81: What, were you expecting not to see the utc - 12 thing again? THE UTC - 12 THIGN ALWAYS RETURNS. ALWAYS.
medians: I knew it would happen. I was the one who started it last year.
Fun_Cupcake_i81: Well then if you didn't want it back maybe you need to time travel to last year and fix that

Oh wait if you could time travel I think we all know exactly when you would go-
user1: That picture is from 2.0. Now he’s at my house and is my pet.
user2: But this is medians we're talking about, so “from 2.0” can mean the same thing as “from five seconds ago”.

Detect Scratch version here
My other accounts: @selfexplanatory @modesties @chaircard @fireflyhero @dividendyield @colloids @radians @skeuamorphism @dihectogon @anglebisector @aau- @EditBlockColors @AdamantOrb @MoongeistBeam @festively @Ampharos_ @straightforwardness
i trolled redcat LOL





if you see this
{what method did you use::control hat
answer on profile ::motion
} ::operators
;
-stxllxr
New to Scratch
100+ posts

Cloud Variable reset to old value when browser is refreshed. [CLOSED]

medians wrote:

No, it has happened to new projects as well. I'm trying to make a test project right now to see
Thou hath stated all projects doeth not function, this is false.
(They said all projects don't work with cloud variables, which is what i was correcting. Only certain projects (most new ones, also some old) cloud don't have their cloud variables updates being saved, and can be fixed by renaming them until they work (usually).)
medians
Scratcher
1000+ posts

Cloud Variable reset to old value when browser is refreshed. [CLOSED]

-stxllxr wrote:

medians wrote:

No, it has happened to new projects as well. I'm trying to make a test project right now to see
Thou hath stated all projects doeth not function, this is false.
(They said all projects don't work with cloud variables, which is what i was correcting. Only certain projects (most new ones, also some old) cloud don't have their cloud variables updates being saved, and can be fixed by renaming them until they work (usually).)
Do you care when people do not end their sentences with a period online xD
Anyways, I was referring to
Certain projects have issues where their cloud variables aren't saving their updates properly, and can be solved by renaming the variable and saving the project, repeating as necessary.)

Last edited by medians (April 1, 2024 23:43:59)


:D: 2.0 is 11 years old https://scratch.mit.edu/projects/1018259409/
Medians bamboozled by 3.0 (version 3.0): https://scratch.mit.edu/projects/979822351/
hi875230163394: You're similar to valve in that you both hate a certain number…
Scratch 0.x, 1.x, 2.x, 3.x and LogoBlocks Archives
Bamboozlement: https://scratch.mit.edu/studios/33739789
Years on internet: 15 (soon 16)
medians: Oh god not this utc - 12 thing again..
Fun_Cupcake_i81: What, were you expecting not to see the utc - 12 thing again? THE UTC - 12 THIGN ALWAYS RETURNS. ALWAYS.
medians: I knew it would happen. I was the one who started it last year.
Fun_Cupcake_i81: Well then if you didn't want it back maybe you need to time travel to last year and fix that

Oh wait if you could time travel I think we all know exactly when you would go-
user1: That picture is from 2.0. Now he’s at my house and is my pet.
user2: But this is medians we're talking about, so “from 2.0” can mean the same thing as “from five seconds ago”.

Detect Scratch version here
My other accounts: @selfexplanatory @modesties @chaircard @fireflyhero @dividendyield @colloids @radians @skeuamorphism @dihectogon @anglebisector @aau- @EditBlockColors @AdamantOrb @MoongeistBeam @festively @Ampharos_ @straightforwardness
i trolled redcat LOL





if you see this
{what method did you use::control hat
answer on profile ::motion
} ::operators
;
Helmentloo
Scratcher
80 posts

Cloud Variable reset to old value when browser is refreshed. [CLOSED]

-stxllxr wrote:

medians wrote:

No, it has happened to new projects as well. I'm trying to make a test project right now to see
Thou hath stated all projects doeth not function, this is false.
(They said all projects don't work with cloud variables, which is what i was correcting. Only certain projects (most new ones, also some old) cloud don't have their cloud variables updates being saved, and can be fixed by renaming them until they work (usually).)
So far all projects don't work. I have not seen one that does work.

Powered by DjangoBB