A
Ariak
Guest
Hey,
I'm working on menus atm and was trying use the ds_map_secure_save and ds_map_secure_load functions to easily store settings info. However, when I reopen my game it can't find the save_file. The documentation only reads stored in a " safe location on the target platform". Maybe i need to create the savefile first?...
Here's the code.
Any help would be greatly appreciated
I'm working on menus atm and was trying use the ds_map_secure_save and ds_map_secure_load functions to easily store settings info. However, when I reopen my game it can't find the save_file. The documentation only reads stored in a " safe location on the target platform". Maybe i need to create the savefile first?...
Here's the code.
Code:
var settings_file="settings.dat";
if file_exists(settings_file) {file_delete(settings_file)} //delete old.
var settings_map=ds_map_create();
settings_map[? "c_resolution"]=c_resolution;
settings_map[? "c_language"]=global.c_language;
ds_map_secure_save(settings_map, settings_file);
ds_map_destroy(settings_map);
Code:
var settings_file="settings.dat";
var save=file_exists(settings_file)
var settings_map=-1;
if save {
settings_map=ds_map_secure_load(settings_file);
}
// STUFFS
if ds_exists(settings_map,ds_type_map){ ds_map_destroy(settings_map);}
Any help would be greatly appreciated