Godot Version
4.4
Question
So my save file is this: {“unlocked_levels”:[1,2]}
And I DO know that that is the same file it’s loading, I’ve checked.
So my load code is this:
var save_game = FileAccess.open("user://savegame.dat", FileAccess.READ)
while save_game.get_position() < save_game.get_length():
var json_string = save_game.get_line()
var json = JSON.new()
var parse_result = json.parse(json_string)
var node_data = json.get_data()
unlocked_levels = node_data.unlocked_levels
print(node_data.unlocked_levels)
(I used Gwizz’s tutorial)
But when I have it print, it prints: [1.0, 2.0] Even though in the save file it’s: [1,2]