FredyH / Perpheads-Issues

5 stars 22 forks source link

Armoury NPC - Invalid guns object after respawning #983

Closed ghost closed 4 years ago

ghost commented 4 years ago

https://i.imgur.com/TEVrOZ6.jpg

[ERROR] gamemodes/perp/gamemode/modules/armory/gui/armory_button.lua:16: attempt to index field 'Item' (a nil value)
  1. SetItem - gamemodes/perp/gamemode/modules/armory/gui/armory_button.lua:16
   2. SetWeaponType - gamemodes/perp/gamemode/modules/armory/gui/amory_menu_weapon.lua:10
    3. Init - gamemodes/perp/gamemode/modules/armory/gui/armory.lua:35
     4. Create - lua/includes/extensions/client/panel/scriptedpanels.lua:37
      5. DoAction - gamemodes/perp/gamemode/modules/armory/npc_armory.lua:63
       6. DoClick - gamemodes/perp/gamemode/modules/npcs/cl_dialog.lua:113
        7. unknown - lua/vgui/dlabel.lua:234
ghost commented 4 years ago

I'm not 100% sure how to recreate this, however, I believe it always happened after I had died

Edit: Probably pretty obvious from the error code, however, this does indeed happen after clicking the armoury/loadout button..

blobvis20 commented 4 years ago

[ERROR] gamemodes/perp/gamemode/modules/armory/gui/armory_button.lua:16: attempt to index field 'Item' (a nil value)

  1. SetItem - gamemodes/perp/gamemode/modules/armory/gui/armory_button.lua:16
    1. SetWeaponType - gamemodes/perp/gamemode/modules/armory/gui/amory_menu_weapon.lua:10
    2. Init - gamemodes/perp/gamemode/modules/armory/gui/armory.lua:29
      1. Create - lua/includes/extensions/client/panel/scriptedpanels.lua:37
      2. DoAction - gamemodes/perp/gamemode/modules/armory/npc_armory.lua:63
      3. DoClick - gamemodes/perp/gamemode/modules/npcs/cl_dialog.lua:113
      4. unknown - lua/vgui/dlabel.lua:234