Data Tables for n00bs and how to handle them
Posted: Mon Sep 28, 2015 8:05 am
I'm a hobby programmer who's never worked in LUA before (VBA/VB.NET/C#) and I'm working on a mod but I'm not sure how arrays/data tables are handled in LUA and how they should be.
I'll be storing some basic information.
Name,
X1, X2, Y1, Y2 (Area co-ords)
amount, (Integer)
CentreX, CentreY (Calculated from Area co-ords)
It should be a add only, no need to remove entries.
The data will be persistent per save.
How should I store this? What tips/tricks should I get to know?
So far I have everything I need, except how to store that. And debugging as I don't think we can step through the code live.
I'll be storing some basic information.
Name,
X1, X2, Y1, Y2 (Area co-ords)
amount, (Integer)
CentreX, CentreY (Calculated from Area co-ords)
It should be a add only, no need to remove entries.
The data will be persistent per save.
How should I store this? What tips/tricks should I get to know?
So far I have everything I need, except how to store that. And debugging as I don't think we can step through the code live.