I'm having troubles adding tabs in the pointshop.



  • So, I’m trying to add new pointshop categories.

    The code is:

    ITEMCAT_GUNS = 1
    ITEMCAT_AMMO = 2
    ITEMCAT_MELEE = 3
    ITEMCAT_TOOLS = 4
    ITEMCAT_OTHER = 5
    ITEMCAT_TRAITS = 6
    ITEMCAT_RETURNS = 7
    ITEMCAT_PISTOLS = 8
    ITEMCAT_SMGS = 9
    ITEMCAT_RIFLES = 10
    ITEMCAT_SNIPERS = 11
    ITEMCAT_SHOTGUNS = 12
    
    GM.ItemCategories = {
    	[ITEMCAT_GUNS] = "Guns",
    	[ITEMCAT_AMMO] = "Ammunition",
    	[ITEMCAT_MELEE] = "Melee Weapons",
    	[ITEMCAT_TOOLS] = "Tools",
    	[ITEMCAT_OTHER] = "Other",
    	[ITEMCAT_TRAITS] = "Traits",
    	[ITEMCAT_RETURNS] = "Returns"
    	[ITEMCAT_PISTOLS] = "Pistols"
    	[ITEMCAT_SMGS] = "SMGs"
    	[ITEMCAT_RIFLES] = "Rifles"
    	[ITEMCAT_SNIPERS] = "Snipers"
    	[ITEMCAT_SHOTGUNS] = "Shotguns"
    }
    
    GM:AddPointShopItem("beretta", "Beretta M92FS", nil, ITEMCAT_PISTOLS, 30, "m9k_m92beretta")
    GM:AddPointShopItem("p229", "SIG P229", nil, ITEMCAT_PISTOLS, 30, "m9k_sig_p229r")
    GM:AddPointShopItem("rbull", "'Raging Bull' .500 Revolver", nil, ITEMCAT_PISTOLS, 45, "m9k_ragingbull")
    GM:AddPointShopItem("cpyth", "Colt Python", nil, ITEMCAT_PISTOLS, 55, "m9k_coltpython")
    GM:AddPointShopItem("glock", "Glock 18", nil, ITEMCAT_PISTOLS, 70, "m9k_glock")
    
    

    And when I load it up, I get a bugged out GUI, a bugged out map, and I get these errors:

    [ERROR] gamemodes/zombiesurvival/gamemode/cl_init.lua:533: attempt to call method 'GetWaveActive' (a nil value)
      1\. unknown - gamemodes/zombiesurvival/gamemode/cl_init.lua:533
    
    [ERROR] gamemodes/zombiesurvival/gamemode/cl_init.lua:644: attempt to call method 'GetWaveActive' (a nil value)
      1\. HumanHUD - gamemodes/zombiesurvival/gamemode/cl_init.lua:644
       2\. unknown - gamemodes/zombiesurvival/gamemode/cl_init.lua:706
    
    [ERROR] gamemodes/zombiesurvival/gamemode/buffthefps.lua:63: 'ZSHUDFontBlur' isn't a valid font
    
      1\. surface_SetFont - [C]:-1
       2\. draw_SimpleText - gamemodes/zombiesurvival/gamemode/buffthefps.lua:63
        3\. SimpleTextBlurry - gamemodes/zombiesurvival/gamemode/cl_draw.lua:41
         4\. unknown - gamemodes/zombiesurvival/gamemode/vgui/zshealtharea.lua:13
    
    [ERROR] gamemodes/zombiesurvival/gamemode/cl_init.lua:533: attempt to call method 'GetWaveActive' (a nil value)
      1\. unknown - gamemodes/zombiesurvival/gamemode/cl_init.lua:533
    
    [ERROR] gamemodes/zombiesurvival/gamemode/cl_init.lua:644: attempt to call method 'GetWaveActive' (a nil value)
      1\. HumanHUD - gamemodes/zombiesurvival/gamemode/cl_init.lua:644
       2\. unknown - gamemodes/zombiesurvival/gamemode/cl_init.lua:706
    
    [ERROR] gamemodes/zombiesurvival/gamemode/buffthefps.lua:63: 'ZSHUDFontBlur' isn't a valid font
    
      1\. surface_SetFont - [C]:-1
       2\. draw_SimpleText - gamemodes/zombiesurvival/gamemode/buffthefps.lua:63
        3\. SimpleTextBlurry - gamemodes/zombiesurvival/gamemode/cl_draw.lua:41
         4\. unknown - gamemodes/zombiesurvival/gamemode/vgui/zshealtharea.lua:13
    
    [ERROR] gamemodes/zombiesurvival/gamemode/cl_init.lua:533: attempt to call method 'GetWaveActive' (a nil value)
      1\. unknown - gamemodes/zombiesurvival/gamemode/cl_init.lua:533
    
    [ERROR] gamemodes/zombiesurvival/gamemode/init.lua:866: attempt to call method 'GetWaveActive' (a nil value)
      1\. unknown - gamemodes/zombiesurvival/gamemode/init.lua:866
    
    [ERROR] gamemodes/zombiesurvival/gamemode/cl_init.lua:644: attempt to call method 'GetWaveActive' (a nil value)
      1\. HumanHUD - gamemodes/zombiesurvival/gamemode/cl_init.lua:644
       2\. unknown - gamemodes/zombiesurvival/gamemode/cl_init.lua:706
    
    [ERROR] gamemodes/zombiesurvival/gamemode/buffthefps.lua:63: 'ZSHUDFontBlur' isn't a valid font
    
      1\. surface_SetFont - [C]:-1
       2\. draw_SimpleText - gamemodes/zombiesurvival/gamemode/buffthefps.lua:63
        3\. SimpleTextBlurry - gamemodes/zombiesurvival/gamemode/cl_draw.lua:41
         4\. unknown - gamemodes/zombiesurvival/gamemode/vgui/zshealtharea.lua:13
    
    [ERROR] gamemodes/zombiesurvival/gamemode/cl_init.lua:533: attempt to call method 'GetWaveActive' (a nil value)
      1\. unknown - gamemodes/zombiesurvival/gamemode/cl_init.lua:533
    
    [ERROR] gamemodes/zombiesurvival/gamemode/cl_init.lua:644: attempt to call method 'GetWaveActive' (a nil value)
      1\. HumanHUD - gamemodes/zombiesurvival/gamemode/cl_init.lua:644
       2\. unknown - gamemodes/zombiesurvival/gamemode/cl_init.lua:706
    
    [ERROR] gamemodes/zombiesurvival/gamemode/buffthefps.lua:63: 'ZSHUDFontBlur' isn't a valid font
    
      1\. surface_SetFont - [C]:-1
       2\. draw_SimpleText - gamemodes/zombiesurvival/gamemode/buffthefps.lua:63
        3\. SimpleTextBlurry - gamemodes/zombiesurvival/gamemode/cl_draw.lua:41
         4\. unknown - gamemodes/zombiesurvival/gamemode/vgui/zshealtharea.lua:13
    
    [ERROR] gamemodes/zombiesurvival/gamemode/cl_init.lua:533: attempt to call method 'GetWaveActive' (a nil value)
      1\. unknown - gamemodes/zombiesurvival/gamemode/cl_init.lua:533
    
    [ERROR] gamemodes/zombiesurvival/gamemode/init.lua:866: attempt to call method 'GetWaveActive' (a nil value)
      1\. unknown - gamemodes/zombiesurvival/gamemode/init.lua:866
    
    [ERROR] gamemodes/zombiesurvival/gamemode/cl_init.lua:644: attempt to call method 'GetWaveActive' (a nil value)
      1\. HumanHUD - gamemodes/zombiesurvival/gamemode/cl_init.lua:644
       2\. unknown - gamemodes/zombiesurvival/gamemode/cl_init.lua:706
    
    [ERROR] gamemodes/zombiesurvival/gamemode/buffthefps.lua:63: 'ZSHUDFontBlur' isn't a valid font
    
      1\. surface_SetFont - [C]:-1
       2\. draw_SimpleText - gamemodes/zombiesurvival/gamemode/buffthefps.lua:63
        3\. SimpleTextBlurry - gamemodes/zombiesurvival/gamemode/cl_draw.lua:41
         4\. unknown - gamemodes/zombiesurvival/gamemode/vgui/zshealtharea.lua:13
    
    [ERROR] gamemodes/zombiesurvival/gamemode/cl_init.lua:533: attempt to call method 'GetWaveActive' (a nil value)
      1\. unknown - gamemodes/zombiesurvival/gamemode/cl_init.lua:533
    
    [ERROR] gamemodes/zombiesurvival/gamemode/cl_init.lua:644: attempt to call method 'GetWaveActive' (a nil value)
      1\. HumanHUD - gamemodes/zombiesurvival/gamemode/cl_init.lua:644
       2\. unknown - gamemodes/zombiesurvival/gamemode/cl_init.lua:706
    
    

    What am I doing oh so wrong?

    I’m shite at lua btw



  • So, I’m trying to add new pointshop categories.

    The code is:

    ITEMCAT_GUNS = 1
    ITEMCAT_AMMO = 2
    ITEMCAT_MELEE = 3
    ITEMCAT_TOOLS = 4
    ITEMCAT_OTHER = 5
    ITEMCAT_TRAITS = 6
    ITEMCAT_RETURNS = 7
    ITEMCAT_PISTOLS = 8
    ITEMCAT_SMGS = 9
    ITEMCAT_RIFLES = 10
    ITEMCAT_SNIPERS = 11
    ITEMCAT_SHOTGUNS = 12
    
    GM.ItemCategories = {
    	[ITEMCAT_GUNS] = "Guns",
    	[ITEMCAT_AMMO] = "Ammunition",
    	[ITEMCAT_MELEE] = "Melee Weapons",
    	[ITEMCAT_TOOLS] = "Tools",
    	[ITEMCAT_OTHER] = "Other",
    	[ITEMCAT_TRAITS] = "Traits",
    	[ITEMCAT_RETURNS] = "Returns"
    	[ITEMCAT_PISTOLS] = "Pistols"
    	[ITEMCAT_SMGS] = "SMGs"
    	[ITEMCAT_RIFLES] = "Rifles"
    	[ITEMCAT_SNIPERS] = "Snipers"
    	[ITEMCAT_SHOTGUNS] = "Shotguns"
    }
    
    GM:AddPointShopItem("beretta", "Beretta M92FS", nil, ITEMCAT_PISTOLS, 30, "m9k_m92beretta")
    GM:AddPointShopItem("p229", "SIG P229", nil, ITEMCAT_PISTOLS, 30, "m9k_sig_p229r")
    GM:AddPointShopItem("rbull", "'Raging Bull' .500 Revolver", nil, ITEMCAT_PISTOLS, 45, "m9k_ragingbull")
    GM:AddPointShopItem("cpyth", "Colt Python", nil, ITEMCAT_PISTOLS, 55, "m9k_coltpython")
    GM:AddPointShopItem("glock", "Glock 18", nil, ITEMCAT_PISTOLS, 70, "m9k_glock")
    
    

    And when I load it up, I get a bugged out GUI, a bugged out map, and I get these errors:

    [ERROR] gamemodes/zombiesurvival/gamemode/cl_init.lua:533: attempt to call method 'GetWaveActive' (a nil value)
      1\. unknown - gamemodes/zombiesurvival/gamemode/cl_init.lua:533
    
    [ERROR] gamemodes/zombiesurvival/gamemode/cl_init.lua:644: attempt to call method 'GetWaveActive' (a nil value)
      1\. HumanHUD - gamemodes/zombiesurvival/gamemode/cl_init.lua:644
       2\. unknown - gamemodes/zombiesurvival/gamemode/cl_init.lua:706
    
    [ERROR] gamemodes/zombiesurvival/gamemode/buffthefps.lua:63: 'ZSHUDFontBlur' isn't a valid font
    
      1\. surface_SetFont - [C]:-1
       2\. draw_SimpleText - gamemodes/zombiesurvival/gamemode/buffthefps.lua:63
        3\. SimpleTextBlurry - gamemodes/zombiesurvival/gamemode/cl_draw.lua:41
         4\. unknown - gamemodes/zombiesurvival/gamemode/vgui/zshealtharea.lua:13
    
    [ERROR] gamemodes/zombiesurvival/gamemode/cl_init.lua:533: attempt to call method 'GetWaveActive' (a nil value)
      1\. unknown - gamemodes/zombiesurvival/gamemode/cl_init.lua:533
    
    [ERROR] gamemodes/zombiesurvival/gamemode/cl_init.lua:644: attempt to call method 'GetWaveActive' (a nil value)
      1\. HumanHUD - gamemodes/zombiesurvival/gamemode/cl_init.lua:644
       2\. unknown - gamemodes/zombiesurvival/gamemode/cl_init.lua:706
    
    [ERROR] gamemodes/zombiesurvival/gamemode/buffthefps.lua:63: 'ZSHUDFontBlur' isn't a valid font
    
      1\. surface_SetFont - [C]:-1
       2\. draw_SimpleText - gamemodes/zombiesurvival/gamemode/buffthefps.lua:63
        3\. SimpleTextBlurry - gamemodes/zombiesurvival/gamemode/cl_draw.lua:41
         4\. unknown - gamemodes/zombiesurvival/gamemode/vgui/zshealtharea.lua:13
    
    [ERROR] gamemodes/zombiesurvival/gamemode/cl_init.lua:533: attempt to call method 'GetWaveActive' (a nil value)
      1\. unknown - gamemodes/zombiesurvival/gamemode/cl_init.lua:533
    
    [ERROR] gamemodes/zombiesurvival/gamemode/init.lua:866: attempt to call method 'GetWaveActive' (a nil value)
      1\. unknown - gamemodes/zombiesurvival/gamemode/init.lua:866
    
    [ERROR] gamemodes/zombiesurvival/gamemode/cl_init.lua:644: attempt to call method 'GetWaveActive' (a nil value)
      1\. HumanHUD - gamemodes/zombiesurvival/gamemode/cl_init.lua:644
       2\. unknown - gamemodes/zombiesurvival/gamemode/cl_init.lua:706
    
    [ERROR] gamemodes/zombiesurvival/gamemode/buffthefps.lua:63: 'ZSHUDFontBlur' isn't a valid font
    
      1\. surface_SetFont - [C]:-1
       2\. draw_SimpleText - gamemodes/zombiesurvival/gamemode/buffthefps.lua:63
        3\. SimpleTextBlurry - gamemodes/zombiesurvival/gamemode/cl_draw.lua:41
         4\. unknown - gamemodes/zombiesurvival/gamemode/vgui/zshealtharea.lua:13
    
    [ERROR] gamemodes/zombiesurvival/gamemode/cl_init.lua:533: attempt to call method 'GetWaveActive' (a nil value)
      1\. unknown - gamemodes/zombiesurvival/gamemode/cl_init.lua:533
    
    [ERROR] gamemodes/zombiesurvival/gamemode/cl_init.lua:644: attempt to call method 'GetWaveActive' (a nil value)
      1\. HumanHUD - gamemodes/zombiesurvival/gamemode/cl_init.lua:644
       2\. unknown - gamemodes/zombiesurvival/gamemode/cl_init.lua:706
    
    [ERROR] gamemodes/zombiesurvival/gamemode/buffthefps.lua:63: 'ZSHUDFontBlur' isn't a valid font
    
      1\. surface_SetFont - [C]:-1
       2\. draw_SimpleText - gamemodes/zombiesurvival/gamemode/buffthefps.lua:63
        3\. SimpleTextBlurry - gamemodes/zombiesurvival/gamemode/cl_draw.lua:41
         4\. unknown - gamemodes/zombiesurvival/gamemode/vgui/zshealtharea.lua:13
    
    [ERROR] gamemodes/zombiesurvival/gamemode/cl_init.lua:533: attempt to call method 'GetWaveActive' (a nil value)
      1\. unknown - gamemodes/zombiesurvival/gamemode/cl_init.lua:533
    
    [ERROR] gamemodes/zombiesurvival/gamemode/init.lua:866: attempt to call method 'GetWaveActive' (a nil value)
      1\. unknown - gamemodes/zombiesurvival/gamemode/init.lua:866
    
    [ERROR] gamemodes/zombiesurvival/gamemode/cl_init.lua:644: attempt to call method 'GetWaveActive' (a nil value)
      1\. HumanHUD - gamemodes/zombiesurvival/gamemode/cl_init.lua:644
       2\. unknown - gamemodes/zombiesurvival/gamemode/cl_init.lua:706
    
    [ERROR] gamemodes/zombiesurvival/gamemode/buffthefps.lua:63: 'ZSHUDFontBlur' isn't a valid font
    
      1\. surface_SetFont - [C]:-1
       2\. draw_SimpleText - gamemodes/zombiesurvival/gamemode/buffthefps.lua:63
        3\. SimpleTextBlurry - gamemodes/zombiesurvival/gamemode/cl_draw.lua:41
         4\. unknown - gamemodes/zombiesurvival/gamemode/vgui/zshealtharea.lua:13
    
    [ERROR] gamemodes/zombiesurvival/gamemode/cl_init.lua:533: attempt to call method 'GetWaveActive' (a nil value)
      1\. unknown - gamemodes/zombiesurvival/gamemode/cl_init.lua:533
    
    [ERROR] gamemodes/zombiesurvival/gamemode/cl_init.lua:644: attempt to call method 'GetWaveActive' (a nil value)
      1\. HumanHUD - gamemodes/zombiesurvival/gamemode/cl_init.lua:644
       2\. unknown - gamemodes/zombiesurvival/gamemode/cl_init.lua:706
    
    

    What am I doing oh so wrong?

    I’m shite at lua btw



  • Bumping with new title



  • Replace with this, you were missing , at the end of each row.

    GM.ItemCategories = {
    [ITEMCAT_GUNS] = “Guns”,
    [ITEMCAT_AMMO] = “Ammunition”,
    [ITEMCAT_MELEE] = “Melee Weapons”,
    [ITEMCAT_TOOLS] = “Tools”,
    [ITEMCAT_OTHER] = “Other”,
    [ITEMCAT_TRAITS] = “Traits”,
    [ITEMCAT_RETURNS] = “Returns”,
    [ITEMCAT_PISTOLS] = “Pistols”,
    [ITEMCAT_SMGS] = “SMGs”,
    [ITEMCAT_RIFLES] = “Rifles”,
    [ITEMCAT_SNIPERS] = “Snipers”,
    [ITEMCAT_SHOTGUNS] = “Shotguns”
    }


Log in to reply
 

5
Online

10976
Users

15257
Topics

297327
Posts

Looks like your connection to NoXiousNet was lost, please wait while we try to reconnect.