Im getting crashes because functions ready and initialize (Weapon_List[weapon.Weapon_Name] = weapon)

Godot Version

version 4.2

extends Node3D
@onready var animation_player = get_node(“AnimationPlayer”)

var Current_Weapon = null

var Weapon_Stack =

var Weapon_Indicator = 0

var Next_Weapon: String

var Weapon_List = {}

@export var _weapon_resources: Array [Weapon_Resource]
@export var Start_Weapons: Array[String]

func _ready():
Initialize(Start_Weapons)

func _input(event):
if event.is_action_pressed(“weapon_up”):
Weapon_Indicator = min(Weapon_Indicator+1, Weapon_Stack.size()-1)
exit(Weapon_Stack[Weapon_Indicator])

if event.is_action_pressed("weapon_down"):
	Weapon_Indicator = max(Weapon_Indicator-1,0)
	exit(Weapon_Stack[Weapon_Indicator])

func Initialize(_start_weapons: Array):
for weapon in _weapon_resources:
Weapon_List[weapon.Weapon_Name] = weapon
for i in _start_weapons:
Weapon_Stack.push_back(i)

Current_Weapon = Weapon_List[Weapon_Stack[0]]

func enter():
animation_player.queue(Current_Weapon.pullout_Anim)

func exit(_Next_Weapon: String):
if _Next_Weapon != Current_Weapon.Weapon_Name:
if animation_player.get_current_animation() != Current_Weapon.pulldown_anim:
animation_player.play(Current_Weapon.pulldown_anim)
Next_Weapon = _Next_Weapon

func Change_Weapon(weapon_name: String):
Current_Weapon = Weapon_List[weapon_name]
Next_Weapon = “”
enter()

func _on_animation_player_animation_finished(anim_name):
if anim_name == Current_Weapon.pulldown_anim:
Change_Weapon(Next_Weapon)

Question

how to fix this thing

i get error for funciton ready and initialize( Invalid Get index Weapon_name on base: resource ( Weapon_resource)