It's really difficult to provide targeted answers about your code when you didn't post your code. However...
The store_line()
method takes a string as an argument, as documented here:
https://docs.godotengine.org/en/stable/classes/class_file.html#class-file-method-store-line
Based on the error you posted, you're apparently trying to pass in an integer
instead of a string
. To fix that, you can convert your integer
to a string
via the str()
function.
So, rather than something like this (which will cause the error you mention):
var a = 1
save_file.store_line(a)
You need something like this:
var a = 1
save_file.store_line(str(a))