-
Sorting returned numerical values of a ‘For Loop’
Hey,
I have a control layer with a number of slider controls that I need sorted in numerical order, highest to lowest (all positive values). I’ve entered the following in the Source Text of a second layer and I get “TypeError: n.sort is not a function.”
n = “”;
for(i=1; i <5; i++){
n += thisComp.layer(“Control”).effect(i)(1)
n += “,”
}
n.sort(function(a,b){return a-b})If someone could help, I’d appreciate it.
Thanks,
Dex