Forum

> > CS2D > Scripts > How to save tables
Forums overviewCS2D overview Scripts overviewLog in to reply

English How to save tables

3 replies
To the start Previous 1 Next To the start

old How to save tables

The Smoker
User Off Offline

Quote
Hello, I'm developing a script, however I am newbie in LUA.
This script has two factions, but I want the player to create his own faction with the "f_create <name>". Okay, I did it.
Factions are on a table and when I create a new faction with the "f_create" the script creates a sub-table with all the information. Look at this.

Spoiler >


My question is how can I save the sub-tables that players create, so that when the server open again they are loaded.

old Re: How to save tables

Louie
User Off Offline

Quote
Try using io.open, io.close, io.write. Save the values of the tables to a file then load those values again the next time the server starts.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview