[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Save the Lua state
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 27 Jun 2000 11:50:00 -0300 (EST)
>From lua-l@tecgraf.puc-rio.br Mon Jun 19 11:42:38 2000
>From: "Olaf Razzoli" <olafr@tin.it>
>
>I'm using Lua in a video game to define scenes behaviour.
>When the user save the game to play later, I need to save the Lua state on a
>file.
>However, the Lua state struct contain a lot of sub-structs dinamically
>allocated.
>There is some way to get this?
Do you really have to save the Lua state struct?
Probably just saving your own (Lua) data structures will suffice.
In this case, it's simple to save this reduced state as a Lua program.
See test/save.lua.
--lhf