Most table functions only work with arrays. (Tables with positive integral keys greater than 0)
table.remove, table.insert, ipairs, #Table, table.sort, and so forth only work on arrays, up to the first nil value. That's just how Lua tables work.
Dictionaries have no order, so you can't sort them. Getting the length is the only thing here that would actually be useful for dictionaries, but oh well.
|