Can anyone help with my game?

Does anyone know what’'s wrong with my code? I’m having problems with equipping weapons. It lets me equip one, but when i have multiple it only lets me equip one, then doesn’t let me change it. Thanks!

WASD for move, E for inventory, weapons should show text when you equip them.