Discuss Scratch

AdamTRei_Dev
Scratcher
60 posts

List

Hi guy's, today I want to know how to edit the JSON so i can make a custom block have a list. I've tried this before, but I haven't got anywhere. Please help. This is what i want:
define Separate [string] by [sep] into [list]
set [i v] to [1]
set [item v] to []
delete (all v) of (list)
repeat until <(i) = (length of (string))>
if <(letter (i) of (string)) = (sep)> then
add (item) to (list)
set [item v] to []



else
set [item v] to (join (item) (letter (i) of (sting)))
end
end

Separate [i love chicken] by [ ] into [list v]
Please help

My browser / operating system: MacOS Macintosh X 10.10.5, Chrome 56.0.2924.87, Flash 25.0 (release 0)
drmcw
Scratcher
1000+ posts

List

Replied to this yesterday but got 403 error and the topic disappeared!

%m.list is what you want.

https://wiki.scratch.mit.edu/wiki/JSON_Tutorial

Powered by DjangoBB