Trying to get string value from a like of a .save file.

Godot Version



say i wanted to get only the text from line 1 of a, for example, 10 line .save file how would i go about that

There is a get_line() function on FileAccess objects that you can use.

var file ="user://", FileAccess.READ)
var line = file.read_line() # reads first line, moves file pointer to the second
var line2 = file.read_line() # reads second line, moves fiile pointer to the third
# ... etc