Browse Source

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
InfiniteProductions 2 years ago
parent
commit
4e27134403
1 changed files with 1 additions and 1 deletions
  1. 1 1
      loading/serialization/save_load_json.gd

+ 1 - 1
loading/serialization/save_load_json.gd

@@ -34,7 +34,7 @@ func save_game():
 			position = var_to_str(enemy.position),
 			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
 	get_node(^"../LoadJSON").disabled = false