[Solved but strange] Problem with save variables in custom game manager

Started by PhoenixII54, June 15, 2015, 09:37:01 PM

Previous topic - Next topic
In my test game, i made a custon central game and save manager.
When creating a game, everything seems fine but it doesn"t seem to take the save and get savegame values function in account. For example, in initialization, i set max life to 10 and two option values for the sound and music volumes in costom named variables, but when calling the game:save() function, max life reverts to 1 and the option variables just don't exist. No error is thrown.
My question is : did i make something wrong or is there a bus with the save management ?

I attached the game manager script so you can chack foir any error.

Thanks in advance for your answer.

I don't see an error just by reading the code.
Maybe someone else will find something?
If not, can you give a link to your whole quest (with google drive or something) so that we can reproduce the bug?

June 16, 2015, 10:46:07 AM #2 Last Edit: June 16, 2015, 10:48:20 AM by PhoenixII54
Here it is. Hope it helps you.


Note : Feel free to switch the "debug" variable in main to see the cell viewer i made to find the problem with streams

June 16, 2015, 11:44:03 AM #3 Last Edit: June 16, 2015, 11:47:34 AM by Christopho
I have just tested and I don't see what you describe. When I save, values are not reverted. My save file has the correct values: max_life is 10 and I have your two new values:

_ability_tunic = 1
_current_life = 1
_joypad_action = "button 0"
_joypad_attack = "button 1"
_joypad_down_key = "axis 1 +"
_joypad_item_1 = "button 2"
_joypad_item_2 = "button 3"
_joypad_left_key = "axis 0 -"
_joypad_pause = "button 4"
_joypad_right = "axis 0 +"
_joypad_up_key = "axis 1 -"
_keyboard_action = "space"
_keyboard_attack = "c"
_keyboard_down = "down"
_keyboard_item_1 = "x"
_keyboard_item_2 = "v"
_keyboard_left = "left"
_keyboard_pause = "d"
_keyboard_right = "right"
_keyboard_up = "up"
_max_life = 10
_starting_map = "tests/out_tile_test_map"
_starting_point = ""
_version = 2
option_music_volume = 50
option_sound_volume = 50

OK, thanks for testing.

Just tested and it worked fine too...

Sounds funny as the last time i tried it just didn't work. Maybe restarting the editor and/or the computer did help.