0 votes

I load a file and get a record too much [arry.pop_back()], and this error message.

enter image description here

in Engine by (29 points)
edited by

I'm a bit confused about what you are trying to achieve here, but it could be interesting to see how you are saving this data. Perhaps the data in the file is not exactly like you expect.

Note: you can do err == OK instead of err == 0.

1 Answer

0 votes

save function

func _on_But_Speichern_pressed():
    save_I(Waff_Arr, Waff_Index+1, "res://Waffen.dat")

func save_I(U_Array, Laenge, FileName):
    var Datei = File.new()
    var err = Datei.open(FileName, File.WRITE) 
    print(str(err))
    for i in range(0, Laenge):
        for j in range(0, Feldlaenge):
            Datei.store_var(U_Array[i][j])
    Datei.close()
by (29 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.