Ok, I have a table that I'm trying to seralize into a variable but it is just not changing the value of the variable. At first I thought there was something wrong if the table so I change it to add a normal string and it still didn't change the variable. I don't know what is wrong with it.
This is the table I'm trying to serialize:
I have printed the output from the serialization code and it is this:
Anyone know what the problem is?
This is the table I'm trying to serialize:
health_stats = {
health = 1000,
mana = 1000,
endurance = 1000,
willpower = 1000,
blood = 100,
max_health = 1000,
max_mana = 1000,
max_endurance = 1000,
max_willpower = 1000
}
function save_tables(a, b, c)
SetVariable("sr_health_stats", serialize('health_stats'))
Note("Table saved")
end -- function
I have printed the output from the serialization code and it is this:
Quote:
health_stats = {}
health_stats.max_mana = 1000
health_stats.max_willpower = 1000
health_stats.mana = 1000
health_stats.blood = 100
health_stats.health = 1000
health_stats.endurance = 1000
health_stats.max_health = 1000
health_stats.willpower = 1000
health_stats.max_endurance = 1000
Table saved
health_stats = {}
health_stats.max_mana = 1000
health_stats.max_willpower = 1000
health_stats.mana = 1000
health_stats.blood = 100
health_stats.health = 1000
health_stats.endurance = 1000
health_stats.max_health = 1000
health_stats.willpower = 1000
health_stats.max_endurance = 1000
Table saved
Anyone know what the problem is?