Saving games for android works the same as computer?

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

i just wanted to know if saving games for android works the same as in the computer. Because i’m trying to seve a game in android this way:

`func _save():
var save_game = File.new()
save_game.open(“user://savegame.save”, File.WRITE)
save_game.store_var(e_t)
save_game.store_var(e_p)

func _load():
var save_game = File.new()
if not save_game.file_exists(“user://savegame.save”):
return
save_game.open(“user://savegame.save”, File.READ)
e_t = save_game.get_var(e_t)
e_p = save_game.get_var(e_p)`

But is not working for android it is working fot the computer

:bust_in_silhouette: Reply From: Wakatta

Yes they work the same way

In the block where you save your data and error is being produced.
Not entirely sure but Godot-Android seems to ignore blocks of faulty code to prevent crashes.

Solution

Use Remote Debugging under the Debug menu to catch and fix your problem