Does the issue occur in the editor or during gameplay? If it occurs during gameplay, please specify which movement system is being used (free movement or grid movement):
Gameplay, Grid
Briefly describe the issue you're experiencing:
When trying to figure out if the save_data(data, filename, *password) would prevent me from deleting the file or uploaded the file without using the password.
When I saved the save_data.json file with a password when reloading the file, it did not prompt a requirement to load the data, still it was possible to delete the file using a script, and when trying to open the save_data.json in VS Code, it was not eligible.
However, when trying to use this process with a save_data.json without a password, the json.file could be loaded and read in VS Code with no issues.
The test was to save a data_file as a json.file without the password, then read it using VScode, and then saving one with a password to see if it matter when you loaded or try to read it in VScode.
Are there any errors in the in-game debug console or external console window?
External console prints this:
ERROR: Script inherits from native type 'Reference', so it can't be instanced in object of type: 'Node2D'
At: modules\gdscript\gdscript.cpp:329
Provide the steps necessary to reproduce the issue:
@ @ @ @
1) Create a script that will save an save_data.json task to be triggered once a new game is activated, this way the script can save the data, with a password requirement, in a Json format.
2) Start a new game and allow the script to run for couple seconds or mins, then quit the game.
3) Using VS Code, try to read the save_data.json file.
4) Now activate the game and continue, once you’re in the game, reload your save_data.json file.
5) Open Console to check for errors and then record any errors.
6) Repeat step 2 to 5 with a script that can save the JSON file without the password requirement.
7) Document any changes or errors between the two processes.
Provide a download link to the bare bones project (if applicable):
Can provide files if necessary.
$file2 = data["npcs2.json"];
print($file2);
for $x in $file2 do
$ent_id = $file2[$ent_num]["id"];
for $prop in $file2[$ent_num]["props"] do
entity[$ent_id].property[$prop] = $file2[$ent_num]["props"][$prop];
end;
for $stat in $file2[$ent_num]["stats"] do
entity[$ent_id].stat[$stat] = $file2[$ent_num]["stats"][$stat];
end;
$ent_num += 1;
end;
for $skil in data["skills.json"] do
global.property[$skil] = data["skills.json"][$skil];
end;
give_item("ITEM_0012", 1, entity["RED DEVIL BAT"]);
give_item("ITEM_0011", 1, entity["RED DEVIL BAT"]);
equip_item(entity["RED DEVIL BAT"], "right_hand", "ITEM_0012");
$string1 = "some test";
$var = 290;
$bool = false;
$cody = codex["value1": $string1, "value2": $var, "value3": $bool];
save_data($cody, "save_dat.json");```