Server Crashes When Anyone Changes Job

Server Crashes When Anyone Changes Job here is my job.lue in darkrp modifcation


--[[---------------------------------------------------------------------------
DarkRP custom jobs
---------------------------------------------------------------------------

This file contains your custom jobs.
This file should also contain jobs from DarkRP that you edited.

Note: If you want to edit a default DarkRP job, first disable it in darkrp_config/disabled_defaults.lua
	Once you've done that, copy and paste the job to this file and edit it.

The default jobs can be found here:
https://github.com/FPtje/DarkRP/blob/master/gamemode/config/jobrelated.lua

For examples and explanation please visit this wiki page:
http://wiki.darkrp.com/index.php/DarkRP:CustomJobFields


Add jobs under the following line:
---------------------------------------------------------------------------]]
TEAM_POLICE = DarkRP.createJob("Police", {
   color = Color(0, 33, 255, 255),
   model = {"models/player/ecpd/male_07.mdl"},
   description = [[Police,Stop All The Crime In The City]],
   weapons = {weapon_deagle2, weapon_limeinv},
   command = "police",
   max = 5,
   salary = 75,
   admin = 0,
   vote = false,
   hasLicense = true,
   candemote = false,
   -- CustomCheck
   medic = false,
   chief = false,
   mayor = false,
   hobo = false,
   cook = false,
   category = "",
})

TEAM_CHEIF = DarkRP.createJob("Police Cheif", {
   color = Color(0, 33, 255, 255),
   model = {"models/player/ecpd/male_04.mdl"},
   description = [[Police,Stop All The Crime In The City]],
   weapons = {weapon_pumpshotgun2, weapon_limeinv},
   command = "cheif",
   max = 1,
   salary = 100,
   admin = 0,
   vote = false,
   hasLicense = true,
   candemote = true,
   -- CustomCheck
   medic = false,
   chief = true,
   mayor = false,
   hobo = false,
   cook = false,
   category = "",
})

TEAM_MAYOR = DarkRP.createJob("Mayor", {
   color = Color(255, 0, 237, 255),
   model = {"models/player/breen.mdl"},
   description = [[Mayor, Make Laws and Keep Every One In Line]],
   weapons = {weapon_limeinv},
   command = "mayor",
   max = 1,
   salary = 200,
   admin = 0,
   vote = false,
   hasLicense = true,
   candemote = true,
   -- CustomCheck
   medic = false,
   chief = true,
   mayor = true,
   hobo = false,
   cook = false,
   category = "",
})

TEAM_DEF = DarkRP.createJob("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 = [[]],
weapons = {weapon_limeinv},
command = "citizen",
max = 0,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
candemote = false
})

--[[---------------------------------------------------------------------------
Define which team joining players spawn into and what team you change to if demoted
---------------------------------------------------------------------------]]
GAMEMODE.DefaultTeam = TEAM_DEF


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

--[[---------------------------------------------------------------------------
Jobs that are hitmen (enables the hitman menu)
---------------------------------------------------------------------------]]
DarkRP.addHitmanTeam(TEAM_MOB)


Any errors?

no

[editline]27th August 2015[/editline]

i dont get to see any even if there were cuz it insta crases when a player join cuz they change job to citizen auto when they join

Check your server’s console

Why two topics?
http://forum.facepunch.com/showthread.php?t=1483008

Try giving the citizen job a category. Don’t know if that will work but it might.

Why don’t you just recode it? It’s literally the template plus four jobs - three of which are modified default jobs. Whatever you’ve done, it’s crashing the server.

Also, side note, why can’t you speak normally? I can barely understand you.

[editline]29th August 2015[/editline]

Whatever. I figured it out:


{weapon_pumpshotgun2, weapon_limeinv}

You’re trying to give players nil variables. These need to be in strings:


{"weapon_pumpshotgun2", "weapon_limeinv"}

[editline]29th August 2015[/editline]

AGAIN. More problems.
You don’t have the team TEAM_MOB so that addHitmanTeam function is just going to throw an error.