#Error
1 messages · Page 1 of 1 (latest)
What's the "slot"?
A string
You think we could know the problem with this little information you provide?🙂
function getEquipment(player) {
let allItems = [];
const allSlots = [
'Chest',
'Feet',
'Head',
'Legs',
'Mainhand',
'Offhand',
];
const equipment = player.getComponent(EntityComponentTypes.Equippable);
for (const slot of allSlots) {
const item = equipment.getEquipmentSlot(slot);
if (!item) continue;
allItems.push(item);
}; return allItems;
};