array_sort() broken on Google Chrome
Gizmo199 opened this issue · 1 comments
Gizmo199 commented
yoyo-danielc commented
Your compare function is incorrect - array_sort() expects a cmp-style function, not a less-than function. Changing it to this works:
array_sort(array, function(a, b){
return a > b ? 1 : (a < b ? -1 : 0);
});
See https://manual.yoyogames.com/GameMaker_Language/GML_Reference/Variable_Functions/array_sort.htm