Page 1 of 1

Storing variables

Posted: Mon Nov 07, 2016 6:23 pm
by revol_
Currently working on a mod that should add editable text signs and I am almost done. After a while I realized that the texts were stored on a table that was client side, but I want my mod to work for servers as well and I want to store the sign texts on the server and preferably even in a way the game puts them in safefiles. How do I do this?

Re: Storing variables

Posted: Mon Nov 07, 2016 6:55 pm
by Klonan
Put them in a global table

Ie if you say global.sign_text = "hello"

It will be preserved across save/load and won't desync