Hello. I’m using something like this [“{red, blue, green, orange, lime}”.selectMany(3).joinItems(", ")]. It works well enough, but when I try to implement uniqueSelect or consumableList it fails. These function seem to only work for lists but is there any way to select items from a string like that without repetition. Thanks!
Sadly, lists created from a string doesn’t work like that. If you want to create a list inline, you can do this instead.
[createPerchanceTree("list = {one|two|three|four}").list.selectUnique(3).joinItems(", ")] // Create a list with `createPerchanceTree` with the name 'list' and the syntax `list = {one|two|three|four}` // Access the new list with `.list` where `list` is the name of the list that is created. // Select unique items from that list with `.selectUnique` // join them with `.joinItems` // Here's with consumableList [x = createPerchanceTree("list = {one|two|three|four}").list.consumableList, x.selectOne] [x.selectOne]
I would still recommend it to be on the list forms that I’ve previously shown for readability and refactorability since if you have many of those one lines, it makes it hard to debug/see problems.