HTML5 Game Save System Not Working

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Xyrog

Hey all! I’m having an issue with the save system for my game not working while running the game in a web browser (HTML5). Here is the code (encryption keys are hidden):

if Active_Save_Slot == 1:
new_file.open_encrypted_with_pass(“user://SaveFile1.cove”, File.WRITE, “”)
new_file.store_line(data)
new_file.close()
if Active_Save_Slot == 2:
new_file.open_encrypted_with_pass(“user://SaveFile2.cove”, File.WRITE, “”)
new_file.store_line(data)
new_file.close()
if Active_Save_Slot == 3:
new_file.open_encrypted_with_pass(“user://SaveFile3.cove”, File.WRITE, “”)
new_file.store_line(data)
new_file.close()

func _load():
var new_file = File.new()
if Active_Save_Slot == 1:
new_file.open_encrypted_with_pass(“user://SaveFile1.cove”, File.READ, “”)
if Active_Save_Slot == 2:
new_file.open_encrypted_with_pass(“user://SaveFile2.cove”, File.READ, “”)
if Active_Save_Slot == 3:
new_file.open_encrypted_with_pass(“user://SaveFile3.cove”, File.READ, “”)
var data = new_file.get_as_text()
new_file.close()

By the code, the save system should be working, however, the main menu of the game is not showing the load button. (The load button shows up when a save file is found in the “user://” directory). The save system does work while running the game on my computer.

Thx for your help!