Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Sininenblue |
I have a text file which has something like
a:this
b:that
c:dog
and i want to load it into godot as a dictionary
func load_file():
var dictionary = {}
var file = File.new()
file.open("filelocation", File.read)enter code here
dictionary = file.get_as_text().split(whenver there's a line break split)
file.close
I have something like this (im on my phone so it’s not exact), but I only get an array and not a dictionary