Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Variables Save
- doorsfan848
-
8 posts
Variables Save
So I need a little help with variables. So I know how they can save being used with a save or load code thing or if you try clicking the green flag BUT when I refresh the tab variables cant save
. What I want exactly is for the variable to save even without a save code and while its refreshing the page. For example, I have a score of 6 on something. If I leave the tab and rejoin, it will automatically set the score to 6. Please someone help me out!!!

- MrKingofScratch
-
100+ posts
Variables Save
Is there a specific reason why you can't use save codes? You can't really do this. I guess you could try to use cloud variables to store a ton of people's scores, but even that isn't foolproof as cloud variables have limited storage. I know there are some crazy people that have servers that store save codes and can give them to people over cloud but that's very hard to do and involves a ton of setup outside of scratch. Save codes are your best bet!
- Saifan2014
-
100+ posts
Variables Save
It
Like a game: So I need a little help with variables. So I know how they can save being used with a save or load code thing or if you try clicking the green flag BUT when I refresh the tab variables cant save. What I want exactly is for the variable to save even without a save code and while its refreshing the page. For example, I have a score of 6 on something. If I leave the tab and rejoin, it will automatically set the score to 6. Please someone help me out!!!
- doorsfan848
-
8 posts
Variables Save
ItLike a game: So I need a little help with variables. So I know how they can save being used with a save or load code thing or if you try clicking the green flag BUT when I refresh the tab variables cant save. What I want exactly is for the variable to save even without a save code and while its refreshing the page. For example, I have a score of 6 on something. If I leave the tab and rejoin, it will automatically set the score to 6. Please someone help me out!!!
Yes but what if someone leaves the tab and then comes back.
Let me give another example. Say I got a score of 10 on something and want it to save. I leave and then later come back to the project. How do I make the project say my exact same score when I leave the tab? (Basically it's supposed to save no matter what)
Last edited by doorsfan848 (Aug. 19, 2024 00:57:07)
- doorsfan848
-
8 posts
Variables Save
Is there a specific reason why you can't use save codes? You can't really do this. I guess you could try to use cloud variables to store a ton of people's scores, but even that isn't foolproof as cloud variables have limited storage. I know there are some crazy people that have servers that store save codes and can give them to people over cloud but that's very hard to do and involves a ton of setup outside of scratch. Save codes are your best bet!
Ok this makes a bunch of sense. Thank you so much man I had no idea at all on how to do this. I could but I felt like an auto saver for a moment. But I guess that won't work. Thanks man I can try. Wish me luck
Last edited by doorsfan848 (Aug. 19, 2024 00:58:38)
- Saifan2014
-
100+ posts
Variables Save
Are you want to save the best scoreItLike a game: So I need a little help with variables. So I know how they can save being used with a save or load code thing or if you try clicking the green flag BUT when I refresh the tab variables cant save. What I want exactly is for the variable to save even without a save code and while its refreshing the page. For example, I have a score of 6 on something. If I leave the tab and rejoin, it will automatically set the score to 6. Please someone help me out!!!
Yes but what if someone leaves the tab and then comes back.
Let me give another example. Say I got a score of 10 on something and want it to save. I leave and then later come back to the project. How do I make the project say my exact same score when I leave the tab? (Basically it's supposed to save no matter what)
- Discussion Forums
- » Help with Scripts
-
» Variables Save