Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Storing username with cloud variables?
- swillia1
-
6 posts
Storing username with cloud variables?
Okay, I was planning on making a game with cloud highscores joined with usernames, BUT, I don't know how. If you could reply, that would be great, thank you, bye!
Last edited by swillia1 (Sept. 4, 2014 22:37:37)
- turkey3
-
1000+ posts
Storing username with cloud variables?
Encoding and Decoding Cloud Data on the Wiki. 

- hppavilion
-
100+ posts
Storing username with cloud variables?
I've done this before. My strategy is to create a variable
abcdefghijklmnopqrstuvwxwz0123456789-=\;',./!@#$%^&*()_+{}|:"<>?`~§ (Note the §. It's important.)
Then, you do something like this.
It starts by setting i, which is a variable representing which letter is being encoded, to zero along with where it's encoding it to. Then, it repeats a process until the entire username has been encoded. i is increased by one to say that the next letter is currently being used. It also resets i2, which is used to find the symbol to encode. It then increments i2 by 1 until it finds what the position of the symbol to be encoded is. It then takes said numer, makes sure it's two symbols long (if it's 1, it adds a zero to the beginning) so that it can be properly decoded. Then it just joins i2 in to the Top Score variable and repeats the process on the next letter.
So to decode it:
To create a list of people, you just need to use a list-to-variable and variable-to-list compressor/decompressor beforehand. I won't explain how to make the decompressor here, but you compress it like this:
To decompress, you just need to figure out how to copy every item until the separator then add the everything, skip the separator, and start the next list item.
which would say something like this:
abcdefghijklmnopqrstuvwxwz0123456789-=\;',./!@#$%^&*()_+{}|:"<>?`~§ (Note the §. It's important.)
Then, you do something like this.
So what's going on here?
It starts by setting i, which is a variable representing which letter is being encoded, to zero along with where it's encoding it to. Then, it repeats a process until the entire username has been encoded. i is increased by one to say that the next letter is currently being used. It also resets i2, which is used to find the symbol to encode. It then increments i2 by 1 until it finds what the position of the symbol to be encoded is. It then takes said numer, makes sure it's two symbols long (if it's 1, it adds a zero to the beginning) so that it can be properly decoded. Then it just joins i2 in to the Top Score variable and repeats the process on the next letter.
So to decode it:
This one is noticeably simpler. It resets i and the output variable, then it just changes i by two then finds the number pair and joins the letter in the index associated with said nuber pair into the output.
To create a list of people, you just need to use a list-to-variable and variable-to-list compressor/decompressor beforehand. I won't explain how to make the decompressor here, but you compress it like this:
That's simple. You just put a separator between each item.
To decompress, you just need to figure out how to copy every item until the separator then add the everything, skip the separator, and start the next list item.
- kbeaver12002
-
3 posts
Storing username with cloud variables?
Last edited by kbeaver12002 (Sept. 24, 2019 17:25:37)
- EvanTheEevee543
-
75 posts
Storing username with cloud variables?
You cannot save words in a cloud variable due to the fact that you might be able to make a chat, the scratch team does not allow people to make chats.
- jaofoody1
-
66 posts
Storing username with cloud variables?
what are these red blocks? like what category are they because i cant find them I've done this before. My strategy is to create a variablewhich would say something like this:
abcdefghijklmnopqrstuvwxwz0123456789-=\;',./!@#$%^&*()_+{}|:"<>?`~§ (Note the §. It's important.)
Then, you do something like this.So what's going on here?
It starts by setting i, which is a variable representing which letter is being encoded, to zero along with where it's encoding it to. Then, it repeats a process until the entire username has been encoded. i is increased by one to say that the next letter is currently being used. It also resets i2, which is used to find the symbol to encode. It then increments i2 by 1 until it finds what the position of the symbol to be encoded is. It then takes said numer, makes sure it's two symbols long (if it's 1, it adds a zero to the beginning) so that it can be properly decoded. Then it just joins i2 in to the Top Score variable and repeats the process on the next letter.
So to decode it:This one is noticeably simpler. It resets i and the output variable, then it just changes i by two then finds the number pair and joins the letter in the index associated with said nuber pair into the output.
To create a list of people, you just need to use a list-to-variable and variable-to-list compressor/decompressor beforehand. I won't explain how to make the decompressor here, but you compress it like this:That's simple. You just put a separator between each item.
To decompress, you just need to figure out how to copy every item until the separator then add the everything, skip the separator, and start the next list item.
- deck26
-
1000+ posts
Storing username with cloud variables?
They're just Scratchblock information that isn't recognised - either because they don't exist or they're not constructed properly. In this case they're just ‘letter of’ and join blocks.what are these red blocks? like what category are they because i cant find them I've done this before. My strategy is to create a variablewhich would say something like this:
abcdefghijklmnopqrstuvwxwz0123456789-=\;',./!@#$%^&*()_+{}|:"<>?`~§ (Note the §. It's important.)
Then, you do something like this.
SNIP ————————–SNIP ————————–
Last edited by deck26 (May 21, 2020 08:13:16)
- TextToScript
-
1 post
Storing username with cloud variables?
you have to make a list to access the red blocks, sorry if this topic is outdated, I just want to help people.
- ScratchLetters2020
-
100+ posts
Storing username with cloud variables?
What!? I thought topics from Scratch 2.0 were archived. . . .
Last edited by ScratchLetters2020 (Oct. 2, 2020 21:07:59)
- deck26
-
1000+ posts
Storing username with cloud variables?
Please create your own topic instead of necroposting.
Usernames in the cloud have to be encoded. There is no such thing as a cloud username though, just a cloud variable being used to store information which may be a username or multiple usernames.
- Smanrocks
-
100+ posts
Storing username with cloud variables?
also some of the red blocks are blocks that appeared in scratch 3.0. the forums use 2.0 so some blocks exist even though they say they dontThey're just Scratchblock information that isn't recognised - either because they don't exist or they're not constructed properly. In this case they're just ‘letter of’ and join blocks.what are these red blocks? like what category are they because i cant find them I've done this before. My strategy is to create a variablewhich would say something like this:
abcdefghijklmnopqrstuvwxwz0123456789-=\;',./!@#$%^&*()_+{}|:"<>?`~§ (Note the §. It's important.)
Then, you do something like this.
SNIP ————————–SNIP ————————–
- Discussion Forums
- » Help with Scripts
-
» Storing username with cloud variables?