BaseWars Gamemode Help!

Hello. I have open a basewars server and the gamemode its have some bugs on buy menu :frowning:

here is the error:

[ERROR] gamemodes/basewars/gamemode/cl_buymenu.lua:51: attempt to concatenate field ‘Model’ (a nil value)

  1. DoPopulate - gamemodes/basewars/gamemode/cl_buymenu.lua:51
  2. DoClick - gamemodes/basewars/gamemode/cl_buymenu.lua:68
  3. InternalDoClick - lua/vgui/dtree_node.lua:81
  4. fn - gamemodes/basewars/gamemode/cl_buymenu.lua:78
  5. Call - addons/ulib/lua/ulib/shared/hook.lua:168
  6. CallPopulateHook - …dbox/gamemode/spawnmenu/creationmenu/content/content.lua:49
  7. Function - gamemodes/basewars/gamemode/cl_buymenu.lua:86
  8. unknown - gamemodes/sandbox/gamemode/spawnmenu/creationmenu.lua:42

here is the code from cl_buymenu.lua


local Panel = vgui.Create( "DFrame" )
Panel:Hide()

hook.Add( "PopulateBasewars", "AddEntityContent", function( pnlContent, tree, node )

    local Categorised = {}
    
    -- Add this list into the tormoil
    local SpawnableEntities = scripted_ents.GetSpawnable()
    
    for k,v in pairs(SpawnableEntities) do --Remove all non basewars items
        if v.Price == nil then
            table.remove(SpawnableEntities, k)
        end
    end

    if ( SpawnableEntities ) then
        for k, v in pairs( SpawnableEntities ) do
            v.Category = v.Category or "Other"
            Categorised[ v.Category ] = Categorised[ v.Category ] or {}
            table.insert( Categorised[ v.Category ], v )
            
        end
    end

    --
    -- Add a tree node for each category
    --
    for CategoryName, v in SortedPairs( Categorised ) do
                    
        -- Add a node to the tree
        local node = tree:AddNode( CategoryName, "icon16/bricks.png" );

            -- When we click on the node - populate it using this function
        node.DoPopulate = function( self )
    
            -- If we've already populated it - forget it.
            if ( self.PropPanel ) then return end
        
            -- Create the container panel
            self.PropPanel = vgui.Create( "ContentContainer", pnlContent )
            self.PropPanel:SetVisible( false )
            self.PropPanel:SetTriggerSpawnlistChange( false )
        
            for k, ent in SortedPairsByMemberValue( v, "PrintName" ) do
                            
                local Icon = spawnmenu.CreateContentIcon( ent.ScriptedEntityType or "entity", self.PropPanel,
                {
                    nicename = ent.PrintName or ent.ClassName,
                    spawnname = ent.ClassName,
                    material = "materials/spawnicons/"..ent.Model,
                    admin = ent.AdminOnly || ( !ent.Spawnable && ent.AdminSpawnable )
                            
                })
                Icon.DoClick = function ()
                    LocalPlayer():ConCommand("buy_entity "..ent.ClassName)
                end
                local Tooltip = Format( "Name: %s
Price: %s", ent.PrintName, ent.Price )
                Icon:SetTooltip( Tooltip )
                                                                
            end
                    
        end

        -- If we click on the node populate it and switch to it.
        node.DoClick = function( self )
    
            self:DoPopulate()
            pnlContent:SwitchPanel( self.PropPanel );
    
        end

    end

    -- Select the first node
    local FirstNode = tree:Root():GetChildNode( 0 )
    if ( IsValid( FirstNode ) ) then
        FirstNode:InternalDoClick()
    end

end )

spawnmenu.AddCreationTab( "Basewars", function()

    local ctrl = vgui.Create( "SpawnmenuContentPanel" )
    ctrl:CallPopulateHook( "PopulateBasewars" );

    return ctrl

end, "icon16/basket.png", 20 )

Im using basewars from RGaming

This one doesnt work at all, add “milbowk0” on steam and ill help you out

That gamemode is extremely WIP. I don’t think there is a public, functional BaseWars gamemode.

I don’t see why people don’t just Convert the old version to GM13… It takes time yea, but its the time worth.