Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | JerryHayat |
I’m rewriting a storage system and ran into an interesting problem. There was an error where I did not change anything. Literally, a minute ago it started and even loaded values - now an error has appeared.
func load_save() -> Dictionary:
var f := File.new()
f.open("res://slot.json", File.READ)
var result := JSON.parse(f.get_as_text())
f.close()
if result.error:
printerr("Failed to parse save file: ", f.error_string)
return result.result as Dictionary
Error: Invalid get index ‘error_string’ (on base: ‘_File’).
I already rolled everything back, but it didn’t fix anything
Rewrite this again - and it works, lol
JerryHayat | 2020-04-26 16:55