As far as I can tell, you can only save out strings of text to files, or, by using CrawlSpaceLib you can save properties like this:
1 2 3 4 | local data = {}; data.lives = 5; data.health = 75; Save(data); |
in c++ you would do something like overwriting the stream >> operator.
but in lua you can't. so you can do two things
one what you describe by saving the contents of the table in string format, or saving an integer 1 for true 0 for false.
c.
as what Carlos said, for Lua, you can try two things, you can use the PropertyBag and save
Level1 =
Level2 =
and so on... or
LevelData = "01110010101"
where each each character corresponds to a level number. Which you can then access easily from Lua.
Plus for levels, *generally* you cannot skip levels and you have to unlock a previous level before you can unlock the next one. So you can just save LevelUnlocked = and keep updating it when you go to the next one.
cheers,
?:)