Cloud Variable reset to old value when browser is refreshed. [CLOSED]
id: 751588
category: Help with Scripts
posts: 21
Apr 1, 2024 05:20:08
Cloud Variable reset to old value when browser is refreshed. [CLOSED]
view on scratch
view on legacy ocular
Helmentloo
loading
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.
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.
Apr 1, 2024 08:47:30
Cloud Variable reset to old value when browser is refreshed. [CLOSED]
view on scratch
view on legacy ocular
deck26
loading
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.
I would allow at least half a second before asking the project to access the cloud variable and certainly before trying to update it.
Apr 1, 2024 14:11:56
Cloud Variable reset to old value when browser is refreshed. [CLOSED]
view on scratch
view on legacy ocular
Helmentloo
loading
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.
Apr 1, 2024 14:18:54
Cloud Variable reset to old value when browser is refreshed. [CLOSED]
view on scratch
view on legacy ocular
deck26
loading
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.
Apr 1, 2024 14:58:27
Cloud Variable reset to old value when browser is refreshed. [CLOSED]
view on scratch
view on legacy ocular
MrKingofScratch
loading
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.
Apr 1, 2024 15:04:02
Cloud Variable reset to old value when browser is refreshed. [CLOSED]
view on scratch
view on legacy ocular
MrKingofScratch
loading
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?
Apr 1, 2024 16:05:58
Cloud Variable reset to old value when browser is refreshed. [CLOSED]
view on scratch
view on legacy ocular
LIZARD_OFFICIAL
loading
rename the cloud variable(s)
Apr 1, 2024 16:30:27
Cloud Variable reset to old value when browser is refreshed. [CLOSED]
view on scratch
view on legacy ocular
MrKingofScratch
loading
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)
Apr 1, 2024 16:39:05
Cloud Variable reset to old value when browser is refreshed. [CLOSED]
view on scratch
view on legacy ocular
Malicondi
loading
renaming the cloud variable(s) then saving the project fixes the problem. 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)
Apr 1, 2024 16:46:35
Cloud Variable reset to old value when browser is refreshed. [CLOSED]
view on scratch
view on legacy ocular
Helmentloo
loading
Thanks everyone for trying to help! I tried renaming it to “Troubled_Cloud” and the problem is still there.
Apr 1, 2024 16:58:49
Cloud Variable reset to old value when browser is refreshed. [CLOSED]
view on scratch
view on legacy ocular
Helmentloo
loading
It looks like it is a bug. It is in this bug report forum: https://scratch.mit.edu/discuss/topic/469469/?page=1
Apr 1, 2024 21:11:02
Cloud Variable reset to old value when browser is refreshed. [CLOSED]
view on scratch
view on legacy ocular
Helmentloo
loading
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.
Apr 1, 2024 21:24:07
Cloud Variable reset to old value when browser is refreshed. [CLOSED]
view on scratch
view on legacy ocular
-stxllxr
loading
Thou is stating false. 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.
(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.)
Apr 1, 2024 21:34:21
Cloud Variable reset to old value when browser is refreshed. [CLOSED]
view on scratch
view on legacy ocular
Helmentloo
loading
@Stxllxr, please show me one project that still can record high score. I would like to find out too.
Apr 1, 2024 21:56:24
Cloud Variable reset to old value when browser is refreshed. [CLOSED]
view on scratch
view on legacy ocular
MrKingofScratch
loading
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!
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!
Apr 1, 2024 23:15:57
Cloud Variable reset to old value when browser is refreshed. [CLOSED]
view on scratch
view on legacy ocular
Helmentloo
loading
@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.
If you have a project that has successfully renamed and work. Please do share it here. I would like to see it.
Thank you.
Apr 1, 2024 23:37:38
Cloud Variable reset to old value when browser is refreshed. [CLOSED]
view on scratch
view on legacy ocular
medians
loading
No, it has happened to new projects as well. I'm trying to make a test project right now to seeThou is stating false. 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.
(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.)
Edit: It still happens:
https://scratch.mit.edu/projects/993179455/
Apr 1, 2024 23:41:11
Cloud Variable reset to old value when browser is refreshed. [CLOSED]
view on scratch
view on legacy ocular
-stxllxr
loading
Thou hath stated No, it has happened to new projects as well. I'm trying to make a test project right now to seeall 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).)
Apr 1, 2024 23:42:29
Cloud Variable reset to old value when browser is refreshed. [CLOSED]
view on scratch
view on legacy ocular
medians
loading
Do you care when people do not end their sentences with a period online xDThou hath stated No, it has happened to new projects as well. I'm trying to make a test project right now to seeall 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).)
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.)
Apr 1, 2024 23:45:37
Cloud Variable reset to old value when browser is refreshed. [CLOSED]
view on scratch
view on legacy ocular
Helmentloo
loading
So far all projects don't work. I have not seen one that does work.Thou hath stated No, it has happened to new projects as well. I'm trying to make a test project right now to seeall 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).)
Apr 1, 2024 23:50:42
Cloud Variable reset to old value when browser is refreshed. [CLOSED]
view on scratch
view on legacy ocular
-stxllxr
loading
Ah, i have been mistaken. Anyways, I was referring toCertain 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.)
(If i wasn't being clear, i was referring to old and new projects alike which have the problem (sometimes, almost as unpredictable as the digits of pi.) .)