lua-users home
lua-l archive

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


>Unfortunately if you alter the code to call save() twice, the second
>time, it serialises:
>I.E. it fails to serialise the same structure more than once.
>Not good.
>
>Also, it relies on being able to insert __visited__ into each table.
>I personally don't want that, hence I'm writing my own, using
>a set of elements etc.

You're right. Like I said, this is *sample* code.
A much better solution is to create a table (local to the chunk) that keeps
tracks of the __visited__ elements.
I'll change save.lua to do that for 4.0 final.
--lhf