Sorry, probably it's my short comprehension, but how can I use the sort command to sort a table by a subtable?
i.e.
t={}
t[0]={name="pippo",age=32}
t[1]={name="pluto",age=24}
t[2]={name="ilBarbax",age=66}
Sort(t.name) does not work
sorting subtables
Re: sorting subtables
For this example try
Code: Select all
Sort(t, Function(a, b) Return(a.name < b.name) EndFunction)