A simple Lua problem here: how to find the index, or key, of the minimum or maximum number in a given table.
math.max/math.min only gives the actual max or min number, not the key.
A simple Lua problem here: how to find the index, or key, of the minimum or maximum number in a given table.
math.max/math.min only gives the actual max or min number, not the key.