I have a table that I need to print out in order. I know LUA tables are not ordered.. but I am having a terrible time printing it out in an ordered way. I have cut a dozen code snips from this site and I just can not get it to work.
Say I have a table like this:
local tableofStuff = {}
tableofStuff['White'] = 15
tableofStuff['Red'] = 55
tableofStuff['Orange'] = 5
tableofStuff['Pink'] = 12
How can I get it to print like this...
Red, 55
White, 15
Pink, 12
Orange, 4
Using a line like this inside a loop...
print(k..', '..v)