lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Sure you can. Your table serialisation code just needs to grab all the keys, sort them, and then write the tables out in sorted order.

What's difficult about that?

On 29 Jul 2014 16:07, "Benoit Germain" <bnt.germain@gmail.com> wrote:
Unfortunately I can't sort something like this (my data is more complex than that of course, I have 600 lines of simular Lua code per settings file):

                ["pushForceCurve"] =
                {
                    ["param1"] = -4,
                    ["param3"] = 0.502515,
                    ["param2"] = 2
                    ["centerOfMassOffset"] =
                    {
                       ["x"] = 0,
                       ["y"] = 0
                    },
                },




2014-07-29 16:39 GMT+02:00 Alex Queiroz <asandroq@gmail.com>:
Hallo,

On Tue, Jul 29, 2014 at 4:33 PM, Benoit Germain <bnt.germain@gmail.com> wrote:

Any thought about this?


Can't you sort the data?

Cheers,



--
Benoit.