0 votes

Hi, I'm trying to get my head around store_line(). If I do,

var file = File.new()
file.open("res://test.txt", File.WRITE)
file.store_line("Hello World")
file.close()

script writes "Hello World."(with dot at the end) into the file.
If I call file.store_line("Hello World") twice,

var file = File.new()
file.open("res://test.txt", File.WRITE)
file.store_line("Hello World")
file.store_line("Hello World")
file.close()

the output is:

Hello World
Hello World

Is this a bug or a feature?

in Engine by (12 points)

1 Answer

0 votes

store line, basically means what it does. stores a line of string datatype with char return. if using notepad, it may show the character return as 'dot'.

imo: if it displays your text properly, the file you write loads up properly with no extra characters, their should be nothing to worry about.

by (109 points)

@shmellyorc , but why it doesn't do it for every store_line() call then? That was actually my point.

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 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 webmaster@godotengine.org with your username.