How do you use lists?

I can't figure out how to use lists. Im doing a savecode but the lists don't seem to work.

Hi, welcome to the forums!
Here's a tutorial you might find helpful.
Also, if you're looking for a system to save games, you might consider checking out the Database library (file => libraries => Database) that allows for storing data in the browser.

if you want a use the "make a list button" like the one in scratch, you have to make a VARIABLE, set it to an empty list, and use the variable as an input to the list slot of blocks you want to use.

I'm just not used to Snap!. I typically main Scratch, but since my district (goguardian block) blocked it for no reason, I'm kinda forced to use snap. What do you mean by set it to an empty list?

untitled script pic

Oh that makes sense. (wait what- live feedback on when someone is replying?)

yep they have it! i'm not sure why...

To make a global list, you need to create a variable first:
image
Then use this block (image) in the set block like so:
image
You can also click the right arrowhead to add items, and drag things in or type.
This will initialize the variable as a list and allow you to execute list functions on it.
To execute list functions, take any block with a little orange list input (i.e. image) and drag the variable in that input slot. If the variable isn't a list when you do this, it will throw an error.
Lists don't have to be global, either. You can have it exist in a script variable:
image
Or you can even just have it be completely anonymous:
image
(Again, I really suggest you check out the database library for saving game data)

I guess its just a discus thing. Thanks for helping. (do signatures exist? oh the other person posted- wait what- it updates live too?)

they're removed

They used to, but there was a ton of drama (some of it was regarding signatures) around late 2020 and the mods removed them as one of the major changes.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.