Why do list variables lose their indexes when used in functions? Is it a known bug, is there any workaround?
code_language.skript:
function sortList(list: objects):
set {_sortedList::*} to {_list::*}
loop {_list::*}:
add 1 to {_count}
set {_indexes::%loop-value%} to loop-index
if mod({_count}, 20) = 0:
wait 1 tick
loop {_sortedList::*}:
set {_current} to {_indexes::%loop-value%}
broadcast "%{_current}% - %loop-value%"
code_language.skript:
command /lis:
trigger:
set {_test::bronko} to 100
set {_test::alvin} to 5000
set {_test::marviina} to 22
sortList({_test::*})