func _on_pressed() -> void:
var bought = self.text
for i in Gm.storedfood:
if Gm.stored[i][0] == bought:
Gm.stored[i][1] += 1
else:
Gm.stored.append[bought][1]
using this code to try and edit an array in order to add a purchased item to it or not however it returns the error
Invalid access to property or key '["name", "amount"]' on a base object of type 'Array'
not sure why