I am having a problem with save/load function in my project
Basically, I want to save an array of item Id's in player inventory, but I get error mentioned in the title.
Here is the code:
var InventoryData = "res://Assets/Data/Inventory.json"
var InventoryID = []
var Invi = 1
func inventory_save():
var file = File.new()
file.open(InventoryData, File.WRITE)
file.store_var(InventoryID.append(Invi))
file.close()
I change Invi in another script, but the error stays the same