Heh. Just realized now what Twisol's suggestion did... resorted my table by name and losing its key sorting, which would be fine if the numbers weren't directly related to the table. :p Time to fix 268 rows in Excel... Done.
Ah, thought that pairsByKeys might be the right one... So here's what I did to actually have it display an individual entry:
Quote: /for k,v in pairsByKeys(table[1]) do print (k,v) end
What I'm not quite sure about is how to get that to update the original table properly and not just display it beautifully... I suppose I can just leave it messy in reality and show it nicely when done, but what do I have to do to make that work... I was trying to come up with a for ipairs that would let me do all the tables, but failing. Now that my table is fixed up again and I have an Excel backup for if I screw it up more with testing, let's see what we can do... heh.
Edit: Twisol, your suggestion would have worked great if I wanted was to change
Quote: 1:
"attack1"="Point"
"finish1"="Handoff"
"level"=1
"name"="Relay"
2:
"attack1"="Clean"
"finish1"="Ringup"
"level"=1
"name"="Busboy" into
Quote: 1:
"attack1"="Clean"
"finish1"="Ringup"
"level"=1
"name"="Busboy"
2:
"attack1"="Point"
"finish1"="Handoff"
"level"=1
"name"="Relay" but I was trying to sort the attack1/finish/level/name, not based on the "name" field. :)
So this will display the whole listing... there's 45 subtables under the main one, but if I can make it not be hardcoded that would be nice... be nicer if I can have it update the table itself. :)
Quote: /for i=1,45 do for k,v in pairsByKeys(table) do print (k,v) end end |