Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func load_profile(name):
- var path = PROFILE_PATH+'/'+name+'/'+name+'.profile'
- var file = File.new()
- if !file.file_exists(path):
- print("No such profile")
- return null
- file.open(path, File.READ)
- var data = {}
- while !file.eof_reached():
- data.parse_json(file.get_line())
- file.close()
- var object = dict2inst(data)
- return object
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement