View difference between Paste ID: 8pEK74kr and UbrX2fDH
SHOW: | | - or go back to the newest paste.
1
func load_profile(name):
2
	var path = PROFILE_PATH+'/'+name+'/'+name+'.profile'
3
	var file = File.new()
4
	if !file.file_exists(path):
5
		print("No such profile")
6
		return null
7
	file.open(path, File.READ)
8
	var data = {}
9
	while !file.eof_reached():
10
		data.parse_json(file.get_line())
11
	file.close()
12-
	return dict2inst(data)
12+
	var object = dict2inst(data)
13
	return object