[R&F] How to declare global table (and access it in functions)?

SoehnelS

Chieftain
Joined
May 22, 2018
Messages
6
Hello!

I declared a table in a lua script (UI context) on top of the script with
gtSoSo01SaveGame = {};
but it is nil in the functions in the script.
(it works fine, when I load the data a function, but I always have to load and save it then)

I'd like to hold data in the table and later save it with the save game (thats already working using Gedemons post https://forums.civfanatics.com/threads/saving-loading-simple-tables-with-a-game.609397/).

Actually I always have to load, insert and save each time I want to add data... :(

Thanks in advance!
 
Top Bottom