- This part here basically grabs the BootConfig.txt - the path to this file is correct.
var BootConfig_res="res://configs/BootConfig.txt"
var BootConfig_file=FileAccess.open(BootConfig_res, FileAccess.READ)
var BootConfig=BootConfig_file.get_as_text()
var BootConfigCommandsRaw=BootConfig.split("\r\n",false)
- Then this code here is used to format & execute
func BootConfigSetupAndInit(): #Cleans & Formats the BootConfig & executes it
var CleanList=[]
var Removed=0
BootConfig_file.close()
for i in range(len(BootConfigCommandsRaw)): #Remove All Comments
BootConfigCommandsRaw[i]=BootConfigCommandsRaw[i].to_upper()
if BootConfigCommandsRaw[i][0]=="#":
CleanList.append(i)
for i in range(len(CleanList)):
BootConfigCommandsRaw.remove_at(CleanList[i]+Removed)
Removed-=1
for i in range(len(BootConfigCommandsRaw)):
match BootConfigCommandsRaw[i]:
"DEBUG_TRUE":
DebugTest=true
"DEBUG_FALSE":
DebugTest=false
"SKIP_INTRO_TRUE":
SkipIntro=true
"SKIP_INTRO_FALSE":
SkipIntro=false
"TYPEOUT_ADD_TIMERS":
AddTimers=true
- The
BootConfigSetupAndInit()function is executed at _ready()
It used to previously work perfectly as I would open the txt files outside of Godot, edit them & later on it would work. However I once made the mistake? of editing the said txt file within Godot and since then it straight up does not read it nor do I get an error?