SDPhantom, thanks for explanation. That's why I modify the lines 20 and 21 into
Lua Code:
local mysortedtable = KillSort(BangCharKills)
for rank,pair in ipairs(mysortedtable) do
Also thought that line 16 is suspicious.
By the way, is sorting of full table required? I naively think that the time required to obtain five top-most results should be smaller.