I've tested my game and it works fine when running in my own web server, but when on itch.io, it leads to a few 403 errors when loading a save file, which leads to a json parse exception. I've searched and I can't figure out what the problem is. The save file name is the same everywhere I use it, there's no casing issues, and I'm being sure to use a unique name. I'm just not sure what the issue is.
function save(_save_data) {
var _sav = file_text_open_write(working_directory + "cowboy_shapeshiftin_save.json");
file_text_write_string(_sav, json_stringify(_save_data));
file_text_close(_sav);
}
function load() {
if !file_exists(working_directory + "cowboy_shapeshiftin_save.json") {
return -1;
}
var _sav = file_text_open_read(working_directory + "cowboy_shapeshiftin_save.json");
var _json = file_text_read_string(_sav);
var _save_data = json_parse(_json);
file_text_close(_sav);
return _save_data;
}