DarkRP Lua errors.

Hey Guys,

I need some help resloving these pain and the ass lua errors.


    3. loadCustomDarkRPItems - gamemodes/darkrp/gamemode/libraries/modificationloader.lua:111
     4. fn - gamemodes/darkrp/gamemode/libraries/modificationloader.lua:119
      5. unknown - addons/ulib/lua/ulib/shared/hook.lua:183


[ERROR] addons/darkrpmodification-master/lua/darkrp_customthings/jobs.lua:89: attempt to call global 'description' (a nil value)
  1. unknown - addons/darkrpmodification-master/lua/darkrp_customthings/jobs.lua:89
   2. include - [C]:-1
    3. loadCustomDarkRPItems - gamemodes/darkrp/gamemode/libraries/modificationloader.lua:111
     4. fn - gamemodes/darkrp/gamemode/libraries/modificationloader.lua:119
      5. unknown - addons/ulib/lua/ulib/shared/hook.lua:183


Thanks in advance

Did you modify the core files? What version are you running? What are you trying to achieve with your edit? Code?

If you edited the core files, revert and make addons…

DarkRP Help Thread:
http://forum.facepunch.com/showthread.php?t=1249475

Without seeing some code all I can tell you is that you’re trying to call description but it is nil so it throws this error.

Read the error; it’s coming from DarkRP Modification, meaning he didn’t edit core files.

Can you please post your jobs.lua?

Thanks, I read the top line and posted! My mistake; I asked a bunch of generalized questions.

But yeah, if we can see some code…



[/*---------------------------------------------------------------------------
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_HITMAN = DarkRP.createJob("Hitman", {
	color = Color(204, 0, 0, 255),
	model = "models/player/guerilla.mdl",
	command = "hitman",
	vote = false,
	salary = 45, -- You can change the salary if you want something else
	weapons = {}, -- You can add a weapon for them here if they're allowed to
	hasLicense = false,
	admin = 0,
	description = [[You're a hitman. People can pay you to do eliminate someone]],
	max = 1
})

TEAM_BANK = DarkRP.createJob("Bank Manager", {
	model = "models/player/Hostage_02.mdl",
	color = Color(47, 79, 79, 255),
	vote = false,
	admin = 0,
	command = "bankmanager",
	hasLicense = false,
	weapons = {},
	max = 1,
	salary = 34,
	description = [[People can place their printers or weapons in the bank
	for safety against raids. Do not steal from it or you'll be arrested and demoted]]
})

TEAM_SWAT = DarkRP.createJob("Swat", {
    color = Color(25, 25, 170, 255),
	model = "models/player/swat.mdl",
	admin = 0,
	vote = true,
	salary = 65,
	command = "swat",
	weapons = {},
	max = 4,
	description = [[You are a SWAT unit. You are a heavier force of the police that can join raids if you
	have a search warrant.]],
	hasLicense = true
})

TEAM_THIEF = DarkRP.createJob("Thief", {
    color = Color(204, 204, 204, 255),
	model = "models/player/arctic.mdl",
	weapons = {"lockpick", "keypad_cracker"},
	admin = 0,
	vote = false,
	command = "thief",
	salary = 45,
	hasLicense = false,
	max = 3,
	description = [[You are a Thief. You can raid other people and mug them but be careful, you can get arrested.]]
})

TEAM_AOD = DarkRP.createJob("Admin on Duty", {
    color = Color(150, 20, 20, 255),
	model = "models/player/combine_super_soldier.mdl",
	vote = false,
	admin = 1,
	command = "aod",
	salary = 0,
	max = 3,
	description = [[You help people around the server that has an issue with a player or something else.]],
	weapons = {},
	hasLicense = false
})

TEAM_DRUG = DarkRP.createJob("Drug Dealer", {
	model = "models/player/eli.mdl",
	color = Color(102, 102, 102, 255),
	admin = 0,
	vote = false,
	command = "drug",
	max = 1,
	description [[You can sell drugs to the people around you, be careful, the cops might catch you]],
	weapons = {},
	hasLicense = false,
})


/*---------------------------------------------------------------------------
Define which team joining players spawn into and what team you change to if demoted
---------------------------------------------------------------------------*/
GAMEMODE.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
---------------------------------------------------------------------------*/
GAMEMODE.CivilProtection = {
	[TEAM_POLICE] = true,
	[TEAM_CHIEF] = true,
	[TEAM_MAYOR] = true,
}

/*---------------------------------------------------------------------------
Jobs that are hitmen (enables the hitman menu)
---------------------------------------------------------------------------*/
DarkRP.addHitmanTeam(TEAM_HITMAN)


Sorry i did not use pastebin!

Just quickly looking through it I found 1 error, remove the , after hasLicense for the drug dealer;


hasLicense = false,

to


hasLicense = false

Your Drug Dealer is missing an ‘=’ after ‘description’

Thanks so much guys. I am kinda blind. Thanks so much for your time!