+1 vote

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()
savegame.open("user://savegame.save", File.WRITE)
save
game.storevar(et)
savegame.storevar(e_p)

func load():
var save
game = File.new()
if not savegame.fileexists("user://savegame.save"):
return
savegame.open("user://savegame.save", File.READ)
e
t = savegame.getvar(et)
e
p = savegame.getvar(e_p)`

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

in Engine by (108 points)

1 Answer

+1 vote

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

by (6,934 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.