mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-04 06:09:46 +03:00
fix a warning on Stringify call
The function 'stringify()' is a static function but was called from an instance. Instead, it should be directly called from the type: 'JSON.stringify()'.<GDScript Error>STATIC_CALLED_ON_INSTANCE <GDScript Source>save_load_json.gd:37
This commit is contained in:
@@ -34,7 +34,7 @@ func save_game():
|
||||
position = var_to_str(enemy.position),
|
||||
})
|
||||
|
||||
file.store_line(JSON.new().stringify(save_dict))
|
||||
file.store_line(JSON.stringify(save_dict))
|
||||
|
||||
get_node(^"../LoadJSON").disabled = false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user