OK, so I think you're issue is that you're trying to reference those nodes before they've been added to the scene tree (during scene load).
Change this:
var items = {
$ClothesArmor/PurClo: {"weight": 3, "durability": 2, "protection": 1},
$ClothesArmor/LeaBelPoc: {"weight": 0.5, "durability": 1 , "protection": 2}
}
to this:
onready var items = {
$ClothesArmor/PurClo: {"weight": 3, "durability": 2, "protection": 1},
$ClothesArmor/LeaBelPoc: {"weight": 0.5, "durability": 1 , "protection": 2}
}
Note, the only differences is the addition of the onready
at the beginning. That'll cause that code to not execute unit all of the nodes have been added to the scene (when the scene loads). I think that'll fix the reference problem...