Discuss Scratch

roast100
Scratcher
19 posts

Variables

How do I get rid of a cloud variable? I tried deleting it, but it keeps popping up again.
Despicable_Dad
Scratcher
500+ posts

Variables

This happens to me sometimes. You are supposed to be able to get rid of it, but sometimes it's a bit slow to go. I think I once succeeded by saving my project then refreshing browser page, but it may have been coincidence!




I'm a Scratch Wiki contributor, and always keen to know which bits of the wiki are unclear. If I can, I'll try to improve things; otherwise, I'll make sure it's brought to the attention of someone who actually knows what they're talking about.
if <not <touching color [#3d4fe4] ?>> then
return true anyway cos computers are vague, innit
change [scratchFoibles v] by (1)
end
if <[a] = [A]> then
think [What???]
change [scratchFoibles v] by (1)
end



roast100
Scratcher
19 posts

Variables

Thanks! I'll try that.
TheLogFather
Scratcher
1000+ posts

Variables

If a variable reappears after deleting it then that means the project and cloud server have got ‘out of sync’ in terms of which variables are in the cloud and which are not.

If the cloud server thinks that a project has a cloud variable, but the project does not actually have it, then what will happen is that the variable gets recreated immediately as a normal global variable. (This only happens if the project is connected to cloud in the fallback polling mode, rather than the fast port 531 connection. However, the port 531 connection is currently disabled, so all projects currently use the fallback mode.)

If you know how to use the Scratch cloud API via Python or JavaScript then it's possible to tell the cloud server to delete the variable manually using that (rather than while editing a Scratch project).

However, you may not know how to do that so the way to fix the problem is to follow these steps, carefully (fallback makes it more complicated, unfortunately):

1) save the project to your local disk;
2) leave the project and create a new project (online);
3) load the project you saved onto disk into the *new* project;
4) delete the problem variable in that new version of the project;
5) recreate the same variable as a *true* cloud variable in the new version of the project;
6) save that newly edited version of the project to disk;
7) leave the new project (you can delete it from your account if you want) and go back to the original;
7) finally, load that newly saved version from disk back into the original project.

That variable will now be a *true* cloud variable in the original project, so the project is now back in sync with the cloud server. That means you will be able to delete it from the project, and doing that will tell the cloud server to delete it too, since it's a true cloud variable.


If the Scratch cloud servers were allowing the fast port 531 cloud connection then it'd be much easier (since it wouldn't create the cloud variable automatically, as soon as you load the project, so you could just recreate it as a true cloudvar straight after loading, and everything would be in sync, allowing to then delete it again.)

But Scratch cloud is fallback-only at the moment, and that means the above fix is kinda tedious.

But it should work, if you follow it through step by step…

Last edited by TheLogFather (April 11, 2017 19:31:00)


Siggy the Kumquat slayer:
Main account: DadOfMrLog –– Frameworks for basic pen-rendered 3D in scratch (see studio). Examples:

- - - - 3D Text - - - - - - Simple shapes - - - Controllable structures - - - On the ground - - - - - - In space - - - -

jacquesimo
Scratcher
100+ posts

Variables

Reloading your project should fix the problem. This problem usually occurs when your project doesn't send the correct updates to the cloud server.
DadOfMrLog
Scratcher
1000+ posts

Variables

jacquesimo wrote:

Reloading your project should fix the problem. This problem usually occurs when your project doesn't send the correct updates to the cloud server.
(Just to note that reloading is not likely to help at the moment – not when cloud is in fallback. The problem is that the project and cloud server are inconsistent – the server says the cloudvar exists, while the project says it doesn't. When that happens, if project is using fallback, and the var doesn't already exist as a normal global var, then it gets created immediately as such. –And then you're stuck, ‘cos you can’t get rid of, since it always just comes straight back. The only way to fix it is to make things in sync again, either by manually telling the cloud server to delete the var, or by forcing the project to actually have a *true* cloudvar. )

Last edited by DadOfMrLog (Jan. 8, 2017 21:23:11)



Alternate account: TheLogFather –– HowTos and useful custom blocks (see studio). Examples below…


- String manipulation - - - X to power of Y - - - Clone point to clone - Detect New Scratcher - Speed tests studio -

creeperbot65
Scratcher
73 posts

Variables

What does it mean when it's in fallback?

when I receive [Search v]
if <[Search Results v] contains [creeperbot65.rf.gd] ?> then
go to [creeperbot65.rf.gd v]
wait (until website loads) secs
say [hmm...] for (2) secs
say [Wow! This is cool!]
end
duckboycool
Scratcher
1000+ posts

Variables

That it updates slowly, but this isn't where to ask.

I used to be active on the forums, but I have mostly moved past Scratch. I still do check my Scratch messages, so if you'd like to talk to me, just leave a comment on my profile. My main project on Scratch was Cookie Clicker, but my newest project is Snake Snake, a game based off of Snake, but with two snakes, and you can play either singleplayer or multiplayer.

titanscratch
Scratcher
100+ posts

Variables

TheLogFather wrote:

<snip>
Good guide! I'll try that!

Scratch Wiki Contributor • Active Forum User • New goal: 500 posts • 310/500 posts (62%)My projectsMy studiosMy profile

(-_-) // This is the Bob the good kumquat. He and his army fight evil kumquats.
(-@-) // This is one of the evil kumquats that eat up your signature!!!
:cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool:
damoni
Scratcher
100+ posts

Variables

TheLogFather wrote:

If a variable reappears after deleting it then that means the project and cloud server have got ‘out of sync’ in terms of which variables are in the cloud and which are not.

If the cloud server thinks that a project has a cloud variable, but the project does not actually have it, then what will happen is that the variable gets recreated immediately as a normal global variable. (This only happens if the project is connected to cloud in the fallback polling mode, rather than the fast port 531 connection. However, the port 531 connection is currently disabled, so all projects currently use the fallback mode.)

If you know how to use the Scratch cloud API via Python or JavaScript then it's possible to tell the cloud server to delete the variable manually using that (rather than while editing a Scratch project).

However, you may not know how to do that so the way to fix the problem is to follow these steps, carefully (fallback makes it more complicated, unfortunately):

1) save the project to your local disk;
2) leave the project and create a new project (online);
3) load the project you saved onto disk into the *new* project;
4) delete the problem variable in that new version of the project;
5) recreate the same variable as a *true* cloud variable in the new version of the project;
6) save that newly edited version of the project to disk;
7) leave the new project (you can delete it from your account if you want) and go back to the original;
7) finally, load that newly saved version from disk back into the original project.

That variable will now be a *true* cloud variable in the original project, so the project is now back in sync with the cloud server. That means you will be able to delete it from the project, and doing that will tell the cloud server to delete it too, since it's a true cloud variable.


If the Scratch cloud servers were allowing the fast port 531 cloud connection then it'd be much easier (since it wouldn't create the cloud variable automatically, as soon as you load the project, so you could just recreate it as a true cloudvar straight after loading, and everything would be in sync, allowing to then delete it again.)

But Scratch cloud is fallback-only at the moment, and that means the above fix is kinda tedious.

But it should work, if you follow it through step by step…


Thank you very much for your help! Nothing worked but your guide worked perfectly fine


                           Check out my Minecraft Project
AcousticGuy
Scratcher
87 posts

Variables

If you delete ANY variable but still have it change that variable in a script it will make that variable again until you delete the script that changes the “non existing” variable.


Make sure you check out my profile!

You can click on one of my games or you can go HERE for a complete list!



TheLightningSpark
Scratcher
2 posts

Variables

AcousticGuy wrote:

If you delete ANY variable but still have it change that variable in a script it will make that variable again until you delete the script that changes the “non existing” variable.


Make sure you check out my profile!
Yeah, it's right.
XBH_Teamgirl
Scratcher
1 post

Variables

How come It says: Variable already exist" Whenever I make a variable????
Variable already exist
(☁ score)
set [ v] to []
WONT LET ME DO A VARIABLE!!!!

Powered by DjangoBB