@@ -232,17 +232,17 @@ load function:
232232 while save_file.get_position() < save_file.get_length():
233233 var json_string = save_file.get_line()
234234
235- # Creates the helper class to interact with JSON
235+ # Creates the helper class to interact with JSON.
236236 var json = JSON.new()
237237
238- # Check if there is any error while parsing the JSON string, skip in case of failure
238+ # Check if there is any error while parsing the JSON string, skip in case of failure.
239239 var parse_result = json.parse(json_string)
240240 if not parse_result == OK:
241241 print("JSON Parse Error: ", json.get_error_message(), " in ", json_string, " at line ", json.get_error_line())
242242 continue
243243
244- # Get the data from the JSON object
245- var node_data = json.get_data()
244+ # Get the data from the JSON object.
245+ var node_data = json.data
246246
247247 # Firstly, we need to create the object and add it to the tree and set its position.
248248 var new_object = load(node_data["filename"]).instantiate()
@@ -284,7 +284,7 @@ load function:
284284 {
285285 var jsonString = saveFile.GetLine();
286286
287- // Creates the helper class to interact with JSON
287+ // Creates the helper class to interact with JSON.
288288 var json = new Json();
289289 var parseResult = json.Parse(jsonString);
290290 if (parseResult != Error.Ok)
@@ -293,7 +293,7 @@ load function:
293293 continue;
294294 }
295295
296- // Get the data from the JSON object
296+ // Get the data from the JSON object.
297297 var nodeData = new Godot.Collections.Dictionary<string, Variant>((Godot.Collections.Dictionary)json.Data);
298298
299299 // Firstly, we need to create the object and add it to the tree and set its position.
0 commit comments