DarkRP showteamtabs.lua error


[ERROR] gamemodes/darkrp/gamemode/client/showteamtabs.lua:535: bad argument #1 to 'concat' (table expected, got string)
  1. concat - [C]:-1
   2. Update - gamemodes/darkrp/gamemode/client/showteamtabs.lua:535
    3. JobsTab - gamemodes/darkrp/gamemode/client/showteamtabs.lua:549
     4. Function - gamemodes/darkrp/gamemode/client/vgui.lua:258
      5. unknown - lua/includes/modules/usermessage.lua:87


I didn’t touch showteamtabs.lua once so i have no idea why this is showing up.
But if anyone has any idea on how to fix this, it would be great.

Paste the code surrounding line 525?


for k,v in ipairs(RPExtraTeams) do
			if LocalPlayer():Team() ~= k then
				local nodude = true
				if v.admin == 1 and not LocalPlayer():IsAdmin() then
					nodude = false
				end
				if v.admin > 1 and not LocalPlayer():IsSuperAdmin() then
					nodude = false
				end
				if v.customCheck and not v.customCheck(LocalPlayer()) then
					nodude = false
				end

				if (type(v.NeedToChangeFrom) == "number" and LocalPlayer():Team() ~= v.NeedToChangeFrom) or (type(v.NeedToChangeFrom) == "table" and not table.HasValue(v.NeedToChangeFrom, LocalPlayer():Team())) then
					nodude = false
				end

				if nodude then
					local weps = "no extra weapons"
					if #v.weapons > 0 then
						weps = table.concat(v.weapons, "
")
					end
					if v.vote then
						local condition = ((v.admin == 0 and LocalPlayer():IsAdmin()) or (v.admin == 1 and LocalPlayer():IsSuperAdmin()) or LocalPlayer().DarkRPVars["Priv"..v.command])
						if not v.model or not v.name or not v.description or not v.command then chat.AddText(Color(255,0,0,255), "Incorrect team! Fix your shared.lua!") return end
						AddIcon(v.model, v.name, v.description, weps, "/vote"..v.command, condition, "/"..v.command)
					else
						if not v.model or not v.name or not v.description or not v.command then chat.AddText(Color(255,0,0,255), "Incorrect team! Fix your shared.lua!") return end
						AddIcon(v.model, v.name, v.description, weps, "/"..v.command)
					end
				end
			end
		end
	end
	hordiv:Update()
	return hordiv
end

function GM:EntitiesTab()
	local EntitiesPanel = vgui.Create("DPanelList")
	EntitiesPanel:EnableVerticalScrollbar( true )
		function EntitiesPanel:Update()
			self:Clear(true)
			local WepCat = vgui.Create("DCollapsibleCategory")
			WepCat:SetLabel("Weapons")
				local WepPanel = vgui.Create("DPanelList")
				WepPanel:SetSize(470, 100)
				WepPanel:SetAutoSize(true)
				WepPanel:SetSpacing(1)
				WepPanel:EnableHorizontal(true)
				WepPanel:EnableVerticalScrollbar(true)
					local function AddIcon(Model, description, command)
						local icon = vgui.Create("SpawnIcon")
						icon:InvalidateLayout( true )
						icon:SetModel(Model)
						icon:SetSize(64, 64)
						icon:SetToolTip(description)
						icon.DoClick = function() LocalPlayer():ConCommand("say "..command) end
						WepPanel:AddItem(icon)
					end

					for k,v in pairs(CustomShipments) do
						if (v.seperate and (not GAMEMODE.Config.restrictbuypistol or
							(GAMEMODE.Config.restrictbuypistol and (not v.allowed[1] or table.HasValue(v.allowed, LocalPlayer():Team())))))
							and (not v.customCheck or v.customCheck and v.customCheck(LocalPlayer())) then
							AddIcon(v.model, string.format(LANGUAGE.buy_a, "a "..v.name, CUR..(v.pricesep or "")), "/buy "..v.name)
						end
					end

					for k,v in pairs(GAMEMODE.AmmoTypes) do
						if not v.customCheck or v.customCheck(LocalPlayer()) then
							AddIcon(v.model, string.format(LANGUAGE.buy_a, v.name, CUR .. v.price), "/buyammo " .. v.ammoType)
						end
					end
			WepCat:SetContents(WepPanel)
			WepCat:SetSkin("DarkRP")
			self:AddItem(WepCat)

			local EntCat = vgui.Create("DCollapsibleCategory")
			EntCat:SetLabel("Entities")
				local EntPanel = vgui.Create("DPanelList")
				EntPanel:SetSize(470, 200)
				EntPanel:SetAutoSize(true)
				EntPanel:SetSpacing(1)
				EntPanel:EnableHorizontal(true)
				EntPanel:EnableVerticalScrollbar(true)
					local function AddEntIcon(Model, description, command)
						local icon = vgui.Create("SpawnIcon")
						icon:InvalidateLayout( true )
						icon:SetModel(Model)
						icon:SetSize(64, 64)
						icon:SetToolTip(description)
						icon.DoClick = function() LocalPlayer():ConCommand("say "..command) end
						EntPanel:AddItem(icon)
					end 

If you didn’t change anything in the file it’s probably another file you edited that cause this error.
Which files did you change in DarkRP? You probably made a few jobs, then post the code for them. Please use [lua] tags instead of the code tag.

You have a team that has no weapons. You fucked up your custom teams.

And how would i fix this?

Post your custom jobs here, with lua tags.

Yeah i know that, the funny thing is, all my jobs have weapons LOL.

You’ve possibly left out something… Just post the code, this is last time I’m asking if you want help…

[lua]/--------------------------------------------------------
Default teams. If you make a team above the citizen team, people will spawn with that team!
--------------------------------------------------------
/
TEAM_CITIZEN = AddExtraTeam(“Citizen”, {
color = Color(20, 150, 20, 255),
model = {
“models/player/Group01/Female_01.mdl”,
“models/player/Group01/Female_02.mdl”,
“models/player/Group01/Female_03.mdl”,
“models/player/Group01/Female_04.mdl”,
“models/player/Group01/Female_06.mdl”,
“models/player/group01/male_01.mdl”,
“models/player/Group01/Male_02.mdl”,
“models/player/Group01/male_03.mdl”,
“models/player/Group01/Male_04.mdl”,
“models/player/Group01/Male_05.mdl”,
“models/player/Group01/Male_06.mdl”,
“models/player/Group01/Male_07.mdl”,
“models/player/Group01/Male_08.mdl”,
“models/player/Group01/Male_09.mdl”
},
description = [[The Citizen is the most basic level of society you can hold
besides being a hobo.
You have no specific role in city life.]],
weapons = {“hl2_combo_fists”},
command = “citizen”,
max = 0,
salary = 45,
admin = 0,
vote = false,
hasLicense = false
})

TEAM_POLICE = AddExtraTeam(“Civil Protection”, {
color = Color(25, 25, 170, 255),
model = “models/player/police.mdl”,
description = [[The protector of every citizen that lives in the city .
You have the power to arrest criminals and protect innocents.
Hit them with your arrest baton to put them in jail
Bash them with a stunstick and they might learn better than to disobey
the law.
The Battering Ram can break down the door of a criminal with a warrant
for his/her arrest.
The Battering Ram can also unfreeze frozen props(if enabled).
Type /wanted <name> to alert the public to this criminal
OR go to tab and warrant someone by clicking the warrant button]],
weapons = {“arrest_stick”, “unarrest_stick”, “weapon_glock2”, “stunstick”, “door_ram”, “weaponchecker”, “hl2_combo_fists”},
command = “cp”,
max = 4,
salary = 65,
admin = 0,
vote = true,
hasLicense = true
})

TEAM_GANG = AddExtraTeam(“Gangster”, {
color = Color(75, 75, 75, 255),
model = {
“models/player/Group03/Female_01.mdl”,
“models/player/Group03/Female_02.mdl”,
“models/player/Group03/Female_03.mdl”,
“models/player/Group03/Female_04.mdl”,
“models/player/Group03/Female_06.mdl”,
“models/player/group03/male_01.mdl”,
“models/player/Group03/Male_02.mdl”,
“models/player/Group03/male_03.mdl”,
“models/player/Group03/Male_04.mdl”,
“models/player/Group03/Male_05.mdl”,
“models/player/Group03/Male_06.mdl”,
“models/player/Group03/Male_07.mdl”,
“models/player/Group03/Male_08.mdl”,
“models/player/Group03/Male_09.mdl”},
description = [[The lowest person of crime.
A gangster generally works for the Mobboss who runs the crime family.
The Mobboss sets your agenda and you follow it or you might be punished.]],
weapons = {“hl2_combo_fists”},
command = “gangster”,
max = 3,
salary = 45,
admin = 0,
vote = false,
hasLicense = false
})

TEAM_MOB = AddExtraTeam(“Mob boss”, {
color = Color(25, 25, 25, 255),
model = “models/player/gman_high.mdl”,
description = [[The Mobboss is the boss of the criminals in the city.
With his power he coordinates the gangsters and forms an efficent crime
organization.
He has the ability to break into houses by using a lockpick.
The Mobboss also can unarrest you.]],
weapons = {“unarrest_stick”, “hl2_combo_fists”},
command = “mobboss”,
max = 4,
salary = 60,
admin = 0,
vote = false,
hasLicense = false
})

TEAM_GUN = AddExtraTeam(“Gun Dealer”, {
color = Color(255, 140, 0, 255),
model = “models/player/monk.mdl”,
description = [[A gun dealer is the only person who can sell guns to other
people.]],
weapons = {“hl2_combo_fists”},
command = “gundealer”,
max = 2,
salary = 45,
admin = 0,
vote = false,
hasLicense = false
})

TEAM_MEDIC = AddExtraTeam(“Medic”, {
color = Color(47, 79, 79, 255),
model = “models/player/kleiner.mdl”,
description = [[With your medical knowledge,
you heal players to proper
health.
Without a medic, people can not be healed.
Left click with the Medical Kit to heal other players.
Right click with the Medical Kit to heal yourself.]],
weapons = {“med_kit”, “hl2_combo_fists”},
command = “medic”,
max = 3,
salary = 45,
admin = 0,
vote = false,
hasLicense = false
})

TEAM_COOK = AddExtraTeam(“Cook”, {
color = Color(238, 99, 99, 255),
model = “models/player/mossman.mdl”,
description = [[As a cook, it is your responsibility to feed the other members
of your city.
You can spawn a microwave and sell the food you make:
/Buymicrowave]],
weapons = {“hl2_combo_fists”},
command = “cook”,
max = 2,
salary = 45,
admin = 0,
vote = false,
hasLicense = false
})

TEAM_CHIEF = AddExtraTeam(“Civil Protection Chief”, {
color = Color(20, 20, 255, 255),
model = “models/player/combine_soldier_prisonguard.mdl”,
description = [[The Chief is the leader of the Civil Protection unit.
Coordinate the police forces to bring law to the city
Hit them with arrest baton to put them in jail
Bash them with a stunstick and they might learn better than to
disobey the law.
The Battering Ram can break down the door of a criminal with a
warrant for his/her arrest.
Type /wanted <name> to alert the public to this criminal
Type /jailpos to set the Jail Position]],
weapons = {“arrest_stick”, “unarrest_stick”, “weapon_deagle2”, “stunstick”, “door_ram”, “weaponchecker”, “hl2_combo_fists”},
command = “chief”,
max = 1,
salary = 75,
admin = 0,
vote = false,
hasLicense = true,
NeedToChangeFrom = TEAM_POLICE
})

TEAM_MAYOR = AddExtraTeam(“Mayor”, {
color = Color(150, 20, 20, 255),
model = “models/player/breen.mdl”,
description = [[The Mayor of the city creates laws to serve the greater good
of the people.
If you are the mayor you may create and accept warrants.
Type /wanted <name> to warrant a player
Type /jailpos to set the Jail Position
Type /lockdown initiate a lockdown of the city.
Everyone must be inside during a lockdown.
The cops patrol the area
/unlockdown to end a lockdown]],
weapons = {“hl2_combo_fists”},
command = “mayor”,
max = 1,
salary = 85,
admin = 0,
vote = true,
hasLicense = false
})

TEAM_HOBO = AddExtraTeam(“Hobo”, {
color = Color(80, 45, 0, 255),
model = “models/player/corpse1.mdl”,
description = [[The lowest member of society. All people see you laugh.
You have no home.
Beg for your food and money
Sing for everyone who passes to get money
Make your own wooden home somewhere in a corner or
outside someone else’s door]],
weapons = {“weapon_bugbait”, “hl2_combo_fists”},
command = “hobo”,
max = 5,
salary = 0,
admin = 0,
vote = false,
hasLicense = false,
})

//ADD CUSTOM TEAMS UNDER THIS LINE:

TEAM_ADMIN = AddExtraTeam(“Administrator”, – Name
Color(220,220,220,255), – Team color
“models/player/monk.mdl”, – Player model
[[Admin on Duty]], – Job description
{“unarrest_stick”, “arrest_stick”, “hl2_combo_fists”}, – Weapons
“admin”, – Command to become the job
3, – Maximum amount of said job
200, – Salary
1, – Admin status
0, – Has to vote
false, – Has a license
nil, – Needs to be job X in order to get this job
function(ply) return ply:GetUserGroup() == “owner2” or ply:GetUserGroup() == “admin” or ply:GetUserGroup() == “superadmin” end
– The extra check function. Enter nil or nothing to not have an extra check)
)

TEAM_DRUG = AddExtraTeam(“Drug Dealer”, – Name
Color(210, 105, 30, 255), – Team color
“models/player/monk.mdl”, – Player model
[[Sell drugs to people]], – Job description
{“hl2_combo_fists”}, – Weapons
“drugdealer”, – Command to become the job
3, – Maximum amount of said job
200, – Salary
0, – Admin status
0, – Has to vote
false, – Has a license
nil, – Needs to be job X in order to get this job
function(ply) return ply:GetUserGroup() == “owner2” or ply:GetUserGroup() == “vip” end
– The extra check function. Enter nil or nothing to not have an extra check)
)

TEAM_PTHIEF = AddExtraTeam(“Pro Thief”, – Name
Color(220, 220, 220, 255), – Team color
“models/player/leet.mdl”, – Player model
[[Pro Thief]], – Job description
{“hl2_combo_fists”}, – Weapons
“prothief”, – Command to become the job
3, – Maximum amount of said job
300, – Salary
0, – Admin status
0, – Has to vote
false, – Has a license
nil, – Needs to be job X in order to get this job
function(ply) return ply:GetUserGroup() == “owner2” or ply:GetUserGroup() == “vip” end
– The extra check function. Enter nil or nothing to not have an extra check)
)

TEAM_THIEF = AddExtraTeam(“Thief”, – Name
Color(220, 220, 220, 255), – Team color
“models/player/phoenix.mdl”,
“models/player/arctic.mdl”, – Player model
[[Thief]], – Job description
{“hl2_combo_fists”}, – Weapons
“thief”, – Command to become the job
7, – Maximum amount of said job
100, – Salary
0, – Admin status
0, – Has to vote
false, – Has a license
nil, – Needs to be job X in order to get this job
function(ply) return ply:GetUserGroup() == “owner2” or ply:GetUserGroup() == “vip” end
– The extra check function. Enter nil or nothing to not have an extra check)
)[/lua]

EDIT : Just fixed it thanks anyway