just can save one element,i need help

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By yuho170

i learn the video to create an item system,but something goes wrong.

i want to add item(resource) into the inventory Array(),but it can not work.

if i use ,it just only could save one data

extends Resource
class_name Inventory

signal item_changed()

export var items = Array() setget set_item,get_item

func set_item(item):
items = item

func get_item():
return items

func add_item(itemname):
var save1 = load(“res://inventory.tres”)
var item = ASDW.readitem(itemname)