Lua Script: “Highest (Lowest) Number” (easy)

Hi.

If you need to retrieve an extermum several time, I suggest you use a sorted data structure.

Also, instead of returning the found_maximum and the name, you could return the index, allowing to retrieve any information. And handling the case where the table is empty:

function find_maximum(table)
    local m = nil
    for key, item in pairs(table) do
        if (m==nil or item[5]>table[m][5]) then
            m = key
        end
    end
    return m
end