|Length of ()|
In certain projects, different events can happen based on the length of a value; this block can be used here.
Some common uses for the Length of () block:
- Checking the number of items a player has obtained
say (join [You have ] (join (length of [list v]) [ items.]))
- Iterating through a list by repeating the length amount of times.
repeat (length of [list v]) change [i v] by (1) say (item (i) of [list v]) for (2) secs end
- Accessing the second last, for example, item of a list
(item ((length of [list v]) - (2)) of [list v])