Bee
Member
Hello wonderful people,
We're so close to launching our first game! But I'm trying to figure out how to save and load from Steam Cloud. Before, I was using ds_map_secure_save and load, but if I do that and save that file, it's encoded and doesn't get decoded. So I tried writing the map to an ini file this way (two methods, but one is commented out):
But it throws the following error:
Attempting to WriteValue for unsupported type -2147483648
The load code I wrote is:
I've never launched a game on Steam before and am pretty new at all this anyhow, so any help will be much appreciated.
We're so close to launching our first game! But I'm trying to figure out how to save and load from Steam Cloud. Before, I was using ds_map_secure_save and load, but if I do that and save that file, it's encoded and doesn't get decoded. So I tried writing the map to an ini file this way (two methods, but one is commented out):
Code:
ini_open("HSmap.ini");
var t_string = ds_map_write(data);
ini_write_string("SaveGame", "0", t_string);
if (steam_is_cloud_enabled_for_account() == true && steam_is_cloud_enabled_for_app() == true) {
show_debug_message("cloud enabled");
//if (!steam_file_exists("HSSaveData.sav")) {
//steam_file_write("HSSaveData.sav", data, ds_map_size(data));
//}
steam_file_write_file("HSSaveData.sav", "HSmap.ini");
}
ini_close();
Attempting to WriteValue for unsupported type -2147483648
The load code I wrote is:
Code:
//if (steam_file_exists("HSSaveData.sav")) {
//var file = steam_file_read("HSSaveData.sav");
//ini_open("HSmap.ini");
//ini_write_string("SaveGame", "0", file);
//var data = ini_read_string("SaveGame", "0", "-1");
//ini_close();
}