Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Interesting List Scripts
- Green4TFG
- Scratcher
7 posts
Interesting List Scripts
Me and some of my friends are doing a pass the game challenge and I recently got someones game to work on. Can someone please tell me what this means/does?
<(item (0) of [list v] :: list) = [0]>
- LUKiCREATE
- Scratcher
17 posts
Interesting List Scripts
Item 0 of any list returns “” (blank string). Therefore,
<(item (0) of [list v]) = (0)>would return “false” because empty strings do not equal 0. If you meant any item of the list, then it would return true if the item equaled 0 and false if not.
Some cool projects
Check out other cool projects here: LUKiGAMES (studio)
Check out other cool projects here: LUKiGAMES (studio)
- Cool_Dude2022
- Scratcher
100+ posts
Interesting List Scripts
Me and some of my friends are doing a pass the game challenge and I recently got someones game to work on. Can someone please tell me what this means/does?<(item (0) of [list v] :: list) = [0]>
That is a boolean; you can tell by the sharp pointy ends. It has an equal sign meaning it's checking if the value on the left, is equivalent to the value on the right. For this case, this block is checking if item 0 of list, is equivalent to 0.
I believe that this should return false since item 0 of a list is a blank space. Last time I checked, a blank space does NOT equal 0.
Last edited by Cool_Dude2022 (March 25, 2024 12:38:57)
Did I help you fix your problem? If so, please nominate my project to be featured!
If my code is used, credit is NOT required
- Green4TFG
- Scratcher
7 posts
Interesting List Scripts
This is very helpful but what confused me is that when item 1 of the list equals 1, it is true. I might end up asking my friend who sent me this if he knows how or if it just works.
- BigNate469
- Scratcher
500+ posts
Interesting List Scripts
Well, if item 1 of the “list” list is “1”, then this would return true. This is very helpful but what confused me is that when item 1 of the list equals 1, it is true. I might end up asking my friend who sent me this if he knows how or if it just works.
Highlight any part of this signature and press ctrl+shift+down arrow to see the rest of it
foreverPlease read the list of Officially Rejected Suggestions before posting a suggestion for Scratch! 100th post
if <person asks [what's a signature] :: sensing> then
Redirect to [https://en.scratch-wiki.info/wiki/Signature] :: motion
end
end
This signature is designed to be as helpful as possible.
View all of the topics you've posted in:
https://scratch.mit.edu/discuss/search/?action=show_user&show_as=topics
View all of your posts:
https://scratch.mit.edu/discuss/search/?action=show_user&show_as=posts
Forum tips:
Don't title topics something like “HELP ME!!!”. It's not helpful, and won't get you as many responses.
Don't post in topics where the latest post is over ~2 months old, unless you have something critical to add. Especially in topics that are several years old- it isn't helpful, and is known as necroposting.
Don't post unrelated things in topics, including questions of your own. Make a new topic for your questions.
You can use the
[code] and [/code]
You can use the
[color=color name or hexadecimal value here] and [/color]
Little-known Scratch URLs:
scratch.pizza (redirects to main page)
https://scratch.mit.edu/projects/PROJECT ID HERE/remixtree (replace “PROJECT ID HERE” with project id number. Shows all the remixes of the project, and the remixes of those projects, and the remixes of those projects, and so on, as a chart. Link currently redirects to one of my projects)
- Green4TFG
- Scratcher
7 posts
Interesting List Scripts
Oh thank you so much! That makes a lot of sense. Well, not the way that it works but the fact of what it does. Thanks!
- Discussion Forums
- » Help with Scripts
- » Interesting List Scripts