True, that would become a problem that I didn’t think of, it should still catch my first line comment in the script I’m testing with… but it would stop after that one. So, the problem still persists, but this is a catch that I would have struggled on for a while after I get the first one to correctly make a child on the tree.
Edit: the get_line() function… …the docs don’t say what happens if it reaches the end of file… would it return null?
Found the below at
while not file.eof_reached():
Reply From: johnygames Basically what you want to do is load a file and read its content. You can do that by placing a .txt file in your project folder. Then you store the file’s path in a variable named “file”. Then you need to open said file and do whatever you want with its content. The following example opens a specified file, goes though it line by line and prints out each line unitl the end of the file is reached. extends Node2D onready var file = 'res:…
And as for the root folder searching only; I was wondering if it was or not, but I have a fix for that in mind when I get to it.
Much thanks.