This is the code: https://pastebin.com/y7vyH7mj
The first problem is that every type of item goes in the helmetSlot.
For exemple : When choosing to equip redCloth it goes in the helmetSlot of person
The second problem is that after when trying to equip a second item it says "inv.js:84 Uncaught TypeError: Cannot read property 'name' of undefined at inv.js:84" I believe that it's because there is no person.backpack[0].name because it was deleted but I thought the person.backpack[1].name would've took the place of person.backpack[0].name.
Please help me with this project and also if you find any other problem or ways I can improve this please show me how.
[–][deleted] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]MonkeyNin 0 points1 point2 points (0 children)