I made a mechanism that if three slots aren't full other Items in a queue get pushed.
The code looks like this:
<<nobr>>
<<set $slots = ["Fish"]>>
<<set $items = ["Bread", "Salad", "Potatos", "Water", "Juice"]>>
<<if $slots.length < 3>>
<<for $slots.length < 3>>
<<set _item = $items[0]>>
Item: <<print _item>><br>
<<set $items.pluck(0, 1)>>
Items: <<print $items>><br>
<<set $slots.push(_item)>>
Slots: <<print $slots>><br>
<</for>>
<</if>>
<</nobr>>
\What do you want to buy?
Right now nothing bad, but when I run it, it looks like this:
Item: Bread
Items: Salad, Potatos, Water, Juice
Slots: Fish, Bread
Item: Potatos
Items: Salad, Water, Juice
Slots: Fish, Bread, Potatos
What do you want to buy?
The next time it looks completely different.
Is there a problem with the 'pluck' ? Something different I don't know or It's a bug.