So, having some issues getting this table to sort correctly.
Basically, table.sort
thinks 10 == 1, 20 == 2, and so on. I'll post my sort code below, but I'm not sure if that has anything to do with it. Is this just an inherent issue with the table.sort algorithm in Lua?
if svKey == "q" and metalMatch == true then
table.sort(vSort.metals, function(oneMQ, twoMQ)
return oneMQ.metalQ > twoMQ.metalQ
end)
end
Values stored in vSort.metals.metalQ
are strings anywhere from 1 to 3 digits long. Is there a way to make table.sort
differentiate between single-, double-, and triple-digit values?
twoMQ.metalQ < oneMQ.metalQ
)?