Lua choose random item from table
- by Zen
Seems easy but I just don't get any further:
Take this example:
local myTable = { 'a', 'b', 'c', 'd' }
print( myTable[ math.random( 0, #myTable - 1 ) ] )
Why doesn't it work?
Google seems to have no answers on this either