Too many LUA Errors, Please help.

Normally I can figure these things out, but ive been dealing with this for about an hour.

[ERROR] gamemodes/darkrp/gamemode/client/showteamtabs.lua:547: bad argument #1 to ‘concat’ (table expected, got string)

  1. concat - [C]:-1
  2. Update - gamemodes/darkrp/gamemode/client/showteamtabs.lua:547
    3. JobsTab - gamemodes/darkrp/gamemode/client/showteamtabs.lua:561
    4. unknown - gamemodes/darkrp/gamemode/client/vgui.lua:270
    5. unknown - gamemodes/darkrp/gamemode/cl_init.lua:237

Any idea of what might be causing this?

Is your DarkRP up-to-date?

Yes… I just installed it on the server a few days ago.

Did you edit showteamstabs.lua by any chance?

No, I had just installed two addons, but when I got these errors, I took them off our workshop…

There is a DarkRP help thread, I’d recommend posting there. But, the error is pretty clear, it’s saying that on line 547, concat is being called and it expects the first argument to be a table, yet it’s receiving a string. Bad input is what’s causing it, make sure it’s receiving a table as input.

A table? Whats that supposed to mean?

[editline]27th June 2013[/editline]

Update: Im also getting the following errors RIGHT when the server starts:

[ERROR] gamemodes/darkrp/gamemode/shared/commands.lua:101: attempt to concatenate field ‘command’ (a table value)

  1. AddTeamCommands - gamemodes/darkrp/gamemode/shared/commands.lua:101
  2. unknown - gamemodes/darkrp/gamemode/shared/makethings.lua:38

Post your shared.lua. I sense that one of your jobs are corrupted or missing values.

[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 = {“weapon_fists”},
command = “citizen”,
max = 0,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
candemote = false
})

TEAM_POLICE = AddExtraTeam(“Civil Protection Deputy”, {
color = Color(25, 25, 170, 255),
model = {“models/player/police.mdl”, “models/player/police_fem.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”, “m9k_m92beretta”, “stunstick”, “door_ram”, “weaponchecker”, “weapon_fists”},
command = “cp”,
max = 4,
salary = 65,
admin = 0,
vote = true,
hasLicense = true,
help = LANGUAGE.cophelp
})

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 = {“weapon_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 = {“lockpick”, “unarrest_stick”},
command = “mobboss”,
max = 1,
salary = 60,
admin = 0,
vote = false,
hasLicense = false,
help = LANGUAGE.bosshelp
})

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.
However, make sure you aren’t caught selling guns that are illegal to
the public.
/Buyshipment <name> to Buy a weapon shipment
/Buygunlab to Buy a gunlab that spawns P228 pistols]],
weapons = {“weapon_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”},
command = “medic”,
max = 3,
salary = 45,
admin = 0,
vote = false,
hasLicense = false
})

TEAM_CHIEF = AddExtraTeam(“Civil Protection Sherrif”, {
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”, “m9k_remington1858”, “stunstick”, “door_ram”, “weaponchecker”, “m9k_colt1911”},
command = “chief”,
max = 1,
salary = 75,
admin = 0,
vote = false,
hasLicense = true,
NeedToChangeFrom = TEAM_POLICE,
help = LANGUAGE.cophelp
})

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 = {“weapon_fists”, “m9k_model627”},
command = “mayor”,
max = 1,
salary = 85,
admin = 0,
vote = true,
hasLicense = false,
help = LANGUAGE.mayorhelp
})

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”, “weapon_fists”},
command = “hobo”,
max = 5,
salary = 0,
admin = 0,
vote = false,
hasLicense = false,
candemote = false
})

//ADD CUSTOM TEAMS UNDER THIS LINE:
TEAM_THIEF = AddExtraTeam(“Thief”, Color(51, 51, 0, 255), “models/player/guerilla.mdl”, [[You are the theif of the town, you steal shit, and
raid people. You can mug people for $500 Or Less.]], {“pro_lockpick”,“weapon_fists”}, “theif”, 2, 35, 0, false, false, false)

TEAM_BANKER = AddExtraTeam(“Banker”, Color(255, 255, 0, 255), “models/player/hostage/hostage_04.mdl”, [[You live in the bank, and may own money printers
legally. Players can keep their printers in the
bank legally, and you may charge them if you want.]], {“weapon_fists”}, “banker”, 1, 50, 0, false, false, false)

TEAM_ADMIN = AddExtraTeam(“Admin On Duty”, Color(0, 0, 0, 255), “models/player/combine_super_soldier.mdl”, [[You are an admin on Duty. You do NOT RP As this
class.

Max Of 2.]], {“weapon_fists”}, “admin”, 2, 0, 1, false, true, false)

TEAM_HITMAN = AddExtraTeam(“Hitman”, Color(255, 0, 0, 255), “models/player/leet.mdl”, [[You accept hits in the !hitmenu]], {“weapon_fists”, “m9k_svu”, “m9k_scoped_taurus”}, “hitman”, 1, 60, 0, false, false, false)

TEAM_PET = AddExtraTeam(“Pet”, Color(204, 102, 0, 255), “models/antlion_guard.mdl”, [[You become someones pet, you may punch people 1
time and then run away.]], {“weapon_fists”}, “pet”, 4, 20, 0, false, false, false)

TEAM_DRUGDEALER = AddExtraTeam(“Drug Dealer”, Color(204, 51, 153, 255), “models/player/monk.mdl”, [[Grow Drugs and make money doing it. THIS CLASS IS
STILL IN DEVEOPEMENT
]], {“weapon_fists”}, “drugdealer”, 2, 30, 0, false, false, false)

TEAM_RACER = AddExtraTeam(“Street Racer”, Color(255, 51, 0, 255), “models/player/vin_diesel/slow.mdl”, [[You are a street racer, you race for money, and
generally work with cars. ]], {“weapon_fists”}, “racer”, 2, 50, 0, false, false, false)

TEAM_SECRETSERVICE = AddExtraTeam(“Secret Service”, Color(0, 102, 0, 255), “models/player/combine_soldier.mdl”, [[You will die for the mayor. You protect him at all
cost, if he dies, you have failed your mission.]], {“weapon_fists”,“m9k_mp7”}, “secretservice”, 2, 100, 0, true, true, false)

TEAM_POLICE = AddExtraTeam(“Police”, Color(0, 0, 102, 255), “models/player/police.mdl”, “models/player/police_fem.mdl”, [[You keep the citizens in order and enforce the
laws.]], {“weapon_fists”,“m9k_sig_p229r”}, “police”, 6, 35, 0, true, false, false)

TEAM_BIO = AddExtraTeam(“Biological Terrorist”, Color(255, 0, 0, 255), “models/player/hostage_04.mdl”, [[You buy gas and throw it at people.]], {“weapon_fists”,“m9k_nerve_gas”}, “bio”, 1, 20, 0, true, false, false)

/*

HOW TO MAKE A DOOR GROUP

AddDoorGroup(“NAME OF THE GROUP HERE, you see this when looking at a door”, Team1, Team2, team3, team4, etc.)

WARNING: THE DOOR GROUPS HAVE TO BE UNDER THE TEAMS IN SHARED.LUA. IF THEY ARE NOT, IT MIGHT MUCK UP!

The default door groups, can also be used as examples:
*/
AddDoorGroup(“Cops and Mayor only”, TEAM_CHIEF, TEAM_POLICE, TEAM_MAYOR)
AddDoorGroup(“Gundealer only”, TEAM_GUN)

/*

HOW TO MAKE AN AGENDA

AddAgenda(Title of the agenda, Manager (who edits it), Listeners (the ones who just see and follow the agenda))

WARNING: THE AGENDAS HAVE TO BE UNDER THE TEAMS IN SHARED.LUA. IF THEY ARE NOT, IT MIGHT MUCK UP!

The default agenda’s, can also be used as examples:
*/
AddAgenda(“Gangster’s agenda”, TEAM_MOB, {TEAM_GANG})
AddAgenda(“Police agenda”, TEAM_MAYOR, {TEAM_CHIEF, TEAM_POLICE})

/*

HOW TO MAKE A GROUP CHAT

Pick one!
GAMEMODE:AddGroupChat(List of team variables separated by comma)

or

GAMEMODE:AddGroupChat(a function with ply as argument that returns whether a random player is in one chat group)
This one is for people who know how to script Lua.

*/
GM:AddGroupChat(function(ply) return ply:IsCP() end)
GM:AddGroupChat(TEAM_MOB, TEAM_GANG)

/---------------------------------------------------------------------------
Define which teams belong to civil protection
Civil protection can set warrants, make people wanted and do some other police related things
---------------------------------------------------------------------------
/
GM.CivilProtection = {
[TEAM_POLICE] = true,
[TEAM_CHIEF] = true,
[TEAM_MAYOR] = true,
}

/---------------------------------------------------------------------------
Enable hitman goodies on this team
---------------------------------------------------------------------------
/
DarkRP.addHitmanTeam(TEAM_MOB)
[/Lua]

Wrap it in [noparse][lua][/lua][/noparse] tags.

A table is, well think of a grocery list. You write usually one after the other, in a linear format. You can expand that grocery list and say indent something on a line, think of that as a nested list. In short, a table is a data structure used to organize data.

It’s defined as { } or { 1, 2, 3, 4 } or { “apples”, “and”, “oranges” } or { { 1, 2, 3, 4 }, { “apples”, “and”, “oranges” } }

A string, which you’re inputting is “this right here!”

The tables I listed above are: Empty { }, a list of 4 integers { 1, 2, 3, 4 }, a list of strings { “apples”, “and”, “oranges” }, and a list containing two lists { { 1, 2, 3, 4 }, { “apples”, “and”, “oranges” } }.

Is this a stock DarkRP installation, or an edited version? Who made it for you if it’s not stock? If it is stock, reinstall.

Check your server console for anything along the lines of this:

“Corrupt team (team name): element (some value) is incorrect.”

I got it from the Github thing.

[editline]27th June 2013[/editline]

I dont have anything like that, but now that I wrapped it in lua tags, Im getting this error right when I join the game:

[ERROR] gamemodes/darkrp/gamemode/shared.lua:1: unexpected symbol near ‘[’

  1. unknown - gamemodes/darkrp/gamemode/shared.lua:0

Don’t wrap it in lua tags, I was talking about when pasting code into a forum post.

Oh, ok. Ill do that now.

[editline]27th June 2013[/editline]

Done

Change this:

[LUA]
TEAM_POLICE = AddExtraTeam(“Police”, Color(0, 0, 102, 255), “models/player/police.mdl”, “models/player/police_fem.mdl”, [[You keep the citizens in order and enforce the
laws.]], {“weapon_fists”,“m9k_sig_p229r”}, “police”, 6, 35, 0, true, false, false)
[/LUA]

To this:

[LUA]
TEAM_POLICE = AddExtraTeam(“Police”, Color(0, 0, 102, 255), {“models/player/police.mdl”, “models/player/police_fem.mdl”}, [[You keep the citizens in order and enforce the
laws.]], {“weapon_fists”,“m9k_sig_p229r”}, “police”, 6, 35, 0, true, false, false)
[/LUA]

Thank you SO much. It worked.