A new question. I'm saving some datas, and among others, a boolean variable ("MonitorCheck", member variable of a class GoalTown), which has as value only "true" or "false". It is defined like that
Code: Select all
class GoalTown
{
[...]
MonitorCheck = false;
[...]
}
Code: Select all
if (this.MonitorCheck == false) {...}
Here is the relevant code:
Code: Select all
class MainClass extends GSController
{ constructor()
{
[...]
::TownMonitorCheckTable <- {};
[...]
}
}
function MainClass::Save()
{
local table = {};
// Building the tables of town's data
foreach (i, town in this.towns)
{
[...]
::TownMonitorCheckTable[town.id] <- town.MonitorCheck;
}
[...]
table.TownMonitorCheckTable <- ::TownMonitorCheckTable;
return table;
}
function MainClass::Load(version, saved_data)
{
[...]
::TownMonitorCheckTable <- saved_data.TownMonitorCheckTable;
}