Discuss Scratch

I_LOVE_TO_MAKE_STUFF
Scratcher
1000+ posts

replace item last of...


I found this block on this wiki page and I can't find it anywhere. Please help me out…


press ctrl+shift+down to see my full siggy!
1000th post
Scratch Team, please add targeted links for the forums!



FIRST EVER SCRATCH PROJECT!!!!!!! IT'S HISTORY!
I have a github account! I can make Websites!
People in the suggestions forums:
YOU MUST READ THIS!!!!

Check out The Forum Helpers!
#StandwithUkraine I am Ukrainian, and lots of my family lives there, please pray for Ukraine

Helpful emoji: ███
MeIzAwezomeDede
Scratcher
1000+ posts

replace item last of...

I'm pretty sure that block was removed in Scratch 3.0, this should be a workaround though:

replace item (length of [list v]) of [list v] with (...)

If that's not what you're talking about, then idk

Nothing to see here
MrCreeper_From_MC
Scratcher
58 posts

replace item last of...

replace item (length of [list v] :: list) of [list v] with [ ]

Last edited by MrCreeper_From_MC (Dec. 16, 2021 17:44:47)


I lik cake it so yumy yum yum yum yum cake so yumy eat it all day yum yum yum
 
when green flag clicked
forever
like (cak v) (because v) its (yumy v) for (3) (years v)
if <not<[alt] = [ek43680]>> then
set [alt v] to [ek43680]
else
lik (cak)
end
end
CoolCrafter1231
Scratcher
100+ posts

replace item last of...

Since the index of the last item will also be the length of the lis you just need to make this block to replace it.
replace item (length of [list v] :: list) of [list v] with [...]

Back to help on the forums

Profiles
postpercent | Scratch | ocular
I_LOVE_TO_MAKE_STUFF
Scratcher
1000+ posts

replace item last of...

Yeah, that's what I did but I just wasn't sure. Thanks though!


press ctrl+shift+down to see my full siggy!
1000th post
Scratch Team, please add targeted links for the forums!



FIRST EVER SCRATCH PROJECT!!!!!!! IT'S HISTORY!
I have a github account! I can make Websites!
People in the suggestions forums:
YOU MUST READ THIS!!!!

Check out The Forum Helpers!
#StandwithUkraine I am Ukrainian, and lots of my family lives there, please pray for Ukraine

Helpful emoji: ███
MrCreeper_From_MC
Scratcher
58 posts

replace item last of...

I_LOVE_TO_MAKE_STUFF wrote:

Yeah, that's what I did but I just wasn't sure. Thanks though!

I like to make stuff too
I
Like
To
Make
Stuff
TOO!

I lik cake it so yumy yum yum yum yum cake so yumy eat it all day yum yum yum
 
when green flag clicked
forever
like (cak v) (because v) its (yumy v) for (3) (years v)
if <not<[alt] = [ek43680]>> then
set [alt v] to [ek43680]
else
lik (cak)
end
end

Powered by DjangoBB