Need help with DarkRP Jobs

I keep getting errors when trying to make custom jobs in DarkRP. I am using ULX, but I keep getting the same error:

[ERROR] gamemodes/darkrp/gamemode/shared.lua:315: ‘}’ expected (to close ‘{’ at line 304) near ‘customCheck’

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

This is my shared.lua:

/--------------------------------------------------------
Default teams. If you make a team above the citizen team, people will spawn with that team!
--------------------------------------------------------
/
[lua]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 = {},
command = “citizen”,
max = 0,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
mayorCanSetSalary = false,
})

TEAM_POLICE = AddExtraTeam(“police”, {
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 a player with your arrest baton to put them in jail
Bash a player with a stunstick and they may learn to obey
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 the presence of a criminal.
OR go to tab and warrant someone by clicking the warrant button]],
weapons = {“arrest_stick”, “unarrest_stick”, “weapon_glock2”, “stunstick”, “door_ram”,“kaypadcracker”,“weaponchecker”},
command = “cp”,
max = 2,
salary = 65,
admin = 0,
vote = true,
hasLicense = true,
help = {
“Please don’t abuse your job”,
“When you arrest someone they are auto transported to jail.”,
“They are auto let out of jail after some time”,
“Type /warrant [Nick|SteamID|Status ID] to set a search warrant for a player.”,
“Type /wanted [Nick|SteamID|Status ID] to alert everyone to a wanted suspect”,
“Type /unwanted [Nick|SteamID|Status ID] to clear the suspect”,
“Type /jailpos to set the jail position”
}
})

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 Mob boss sets your agenda and you follow it or you might be punished.]],
weapons = {},
command = “gangster”,
max = 3,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
mayorCanSetSalary = false
})

TEAM_MOB = AddExtraTeam(“Mob boss”, {
color = Color(25, 25, 25, 255),
model = “models/player/gman_high.mdl”,
description = [[The Mob boss is the boss of the criminals in the city.
With his power he coordinates the gangsters and forms an efficient crime
organization.
He has the ability to break into houses by using a lockpick.
The Mob boss posesses the ability to unarrest you.]],
weapons = {“lockpick”, “unarrest_stick”},
command = “mobboss”,
max = 1,
salary = 60,
admin = 0,
vote = false,
hasLicense = false,
mayorCanSetSalary = false,
help = {
“As the Mob boss, you decide what you want the other Gangsters to do.”,
“You get an Unarrest Stick which you can use to break people out of jail.”,
“/agenda <Message> Sets the Gangsters’ agenda. Use // to go to the next line.”
}
})

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 illegal firearms to
the public.
/Buyshipment <name> to Buy a weapon shipment
/Buygunlab to Buy a gunlab that spawns P228 pistols]],
weapons = {},
command = “gundealer”,
max = 2,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
mayorCanSetSalary = true
})

TEAM_MEDIC = AddExtraTeam(“Medic”, {
color = Color(47, 79, 79, 255),
model = “models/player/kleiner.mdl”,
description = [[With your medical knowledge,
you work to restore players to full health.
Without a medic, people cannot 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 = 1,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
medic = true,
mayorCanSetSalary = true
})

TEAM_CHIEF = AddExtraTeam(“Police 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 force to enforce law in the city.
Hit a player with arrest baton to put them in jail.
Bash a player with a stunstick and they may learn to
obey 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 the presence of a criminal.
Type /jailpos to set the Jail Position]],
weapons = {“arrest_stick”, “unarrest_stick”, “weapon_deagle2”, “stunstick”, “door_ram”, “weaponchecker”},
command = “chief”,
max = 1,
salary = 75,
admin = 0,
vote = false,
hasLicense = true,
chief = true,
NeedToChangeFrom = TEAM_POLICE,
help = {
“Please don’t abuse your job”,
“When you arrest someone they are auto transported to jail.”,
“They are auto let out of jail after some time”,
“Type /warrant [Nick|SteamID|Status ID] to set a search warrant for a player.”,
“Type /wanted [Nick|SteamID|Status ID] to alert everyone to a wanted suspect”,
“Type /unwanted [Nick|SteamID|Status ID] to clear the suspect”,
“Type /jailpos to set the jail position”
}
})

TEAM_MAYOR = AddExtraTeam(“Mayor”, {
color = Color(150, 20, 20, 255),
model = “models/player/breen.mdl”,
description = [[The Mayor of the city creates laws to govern the city.
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 = {},
command = “mayor”,
max = 1,
salary = 100,
admin = 0,
vote = true,
hasLicense = false,
mayor = true,
help = {
“Type /warrant [Nick|SteamID|Status ID] to set a search warrant for a player.”,
“Type /wanted [Nick|SteamID|Status ID] to alert everyone to a wanted suspect.”,
“Type /unwanted [Nick|SteamID|Status ID] to clear the suspect.”,
“Type /lockdown to initiate a lockdown”,
“Type /unlockdown to end a lockdown”,
“Type /placelaws to place a screen containing the laws.”,
“Type /addlaw and /removelaw to edit the laws.”
}
})

TEAM_HOBO = AddExtraTeam(“Hobo”, {
color = Color(80, 45, 0, 255),
model = “models/player/corpse1.mdl”,
description = [[The lowest member of society. Everybody laughs at you.
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”},
command = “hobo”,
max = 0,
salary = 1,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
hobo = true,
mayorCanSetSalary = false
})

//ADD CUSTOM TEAMS UNDER THIS LINE:

 TEAM_SWAT = AddExtraTeam("S.W.A.T", {
    color = Color(80, 45, 0, 255),
    model = "models/player/swat.mdl",
    description = [[This is a donator special job,
            your duty is to heal on of your
            wounded operatives. You should stay in the PD
            until backup is needed.
            Do everything you can to keep the city safe.
            You can heal your team, but it's not optinal unless theres
            no medics alive. If theres no mayor, you're in charge.]],
    weapons = {"arrest_stick", "unarrest_stick", "weapon_glock2", "ls_sniper", "weapon_mp52", "stunstick", "door_ram", "weaponchecker"},
    command = "swat",
    max = 2,
    salary = 75,
    admin = 0,
    vote = false,
    hasLicense = true,
    customCheck = function(ply) 
	return  ply:IsUserGroup("vip")
	end

})

  TEAM_thief = AddExtraTeam("Thief", {
    color = Color(80, 45, 0, 255),
    model = "models/css.arctic",
    description = [[You're a Thief you join a gang and raid!]],
    weapons = {"lockpick","keypadcracker"},
    command = "",
    max = 2,
    salary = 35,
    admin = 0,
    vote = false,
    hasLicense = false

})

TEAM_stores = AddExtraTeam(“Store Owner”, {
color = Color(80, 45, 0, 255),
model = “models/css.arctic”,
description = [[Owns stores, hires clerks to run it.]],
weapons = {""},
command = “”,
max = 1,
salary = 60,
admin = 0,
vote = false,
hasLicense = false
})

 TEAM_Clerk = AddExtraTeam("Clerk", {
    color = Color(80, 45, 0, 255),
    model = "models/css.arctic",
    description = [[Runs the stores as directed by the Store Keeper.]],
    weapons = {""},
    command = "gundealer",
    max = 3,
    salary = 50,
    admin = 0,
    vote = false,
    hasLicense = false

})

TEAM_BMD = AddExtraTeam("Black Market Dealer", {
    color = Color(80, 45, 0, 255),
    model = "models/css.arctic",
    description = [[Looks like a citizen, but sells guns to people that don't have a gun licence.]],
    weapons = {"gundealer"},
    command = "",
    max = 1,
    salary = 45,
    admin = 0,
    vote = false,
    hasLicense = false
    customCheck = function(ply) 
    return  ply:IsUserGroup("vip") 
    end

})

 TEAM_resistance = AddExtraTeam("Resistance", {
    color = Color(80, 45, 0, 255),
    model = "models/css.arctic",
    description = [[Seems legit, but in reality they want to try and overthrow the town and have one of their own!]],
    weapons = {"weapon_glock2",},
    command = "",
    max = 4,
    salary = 45,
    admin = 0,
    vote = false,
    hasLicense = false

})

 TEAM_bodyguard = AddExtraTeam("Body Guard", {
    color = Color(80, 45, 0, 255),
    model = "models/css.arctic",
    description = [[Is hired by anyone that feels they need protection.]],
    weapons = {"weapon_glock2",},
    command = "",
    max = 2,
    salary = 60,
    admin = 0,
    vote = false,
    hasLicense = false

})

 TEAM_ResistanceLeader = AddExtraTeam("Resistance Leader", {
    color = Color(80, 45, 0, 255),
    model = "models/css.arctic",
    description = [[Leads the resistance.]],
    weapons = {"weapon_glock2","lockpick","unarrest_stick"},
    command = "",
    max = 1,
    salary = 60,
    admin = 0,
    vote = false,
    hasLicense = false

})
TEAM_Admin on Duty = AddExtraTeam(“Admin on Duty”, {
color = Color(80, 45, 0, 255),
model = “models/css.arctic”,
description = [[Is the admin on duty.]],
weapons = {“unarrest_stick”},
command = “”,
max = 0,
salary = 0,
admin = 0,
vote = false,
hasLicense = false
customCheck = function(ply)
return ply:IsUserGroup(“admin”)
end
})
TEAM_super Admin on Duty = AddExtraTeam(“Super Admin on Duty”, {
color = Color(80, 45, 0, 255),
model = “models/css.arctic”,
description = [[Is the admin on duty.]],
weapons = {“unarrest_stick”},
command = “”,
max = 0,
salary = 0,
admin = 0,
vote = false,
hasLicense = false
customCheck = function(ply)
return ply:IsUserGroup(“super admin”) end
})

/*

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 team joining players spawn into and what team you change to if demoted
---------------------------------------------------------------------------
/
GM.DefaultTeam = TEAM_CITIZEN

/---------------------------------------------------------------------------
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]

Anyone know what the problem is?

Add a comma before each of the customCheck functions; for example: [lua]
hasLicense = false
customCheck = function(ply) [/lua] would look like [lua]
hasLicense = false,
customCheck = function(ply) [/lua] Next time use [.lua][./lua] tags(without he periods in it) and the error said exactly what was wrong.

Thanks. I will tell you if this works.

[editline]21st September 2013[/editline]

It fixed that particular error, but turns out there were tabs too :stuck_out_tongue:

Tabs?

If you have no problem anymore, you may just click the ‘Mark as solved’ button…