So I was making some custom jobs for DarkRP, And a few of them I took from some paste bins to save me time. However I keep getting a LUA Error directing me to the "Admin" Line of each class. Here's the initial error;
[ERROR] addons/darkrpmodification-master/lua/darkrp_customthings/jobs.lua:302: '}' expected (to close '{' at line 289) near 'description'
1. unknown - addons/darkrpmodification-master/lua/darkrp_customthings/jobs.lua:0
Not being able to figure out the problem, I removed the job in which the error was in and I got another error with the same report just different line number. The error still pointed me to the line # that housed the "Admin" code. Here is my Jobs.Lua contents.
/*---------------------------------------------------------------------------
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:
[url]https://github.com/FPtje/DarkRP/blob/master/gamemode/config/jobrelated.lua[/url]
For examples and explanation please visit this wiki page:
[url]http://wiki.darkrp.com/index.php/DarkRP:CustomJobFields[/url]
Add jobs under the following line:
---------------------------------------------------------------------------*/
TEAM_ADMIN = DarkRP.createJob("Administration", {
color = Color(255, 0, 0, 255),
model = "models/dean/chase.mdl",
description = [[Administration on-duty.]],
weapons = {"arrest_stick", "unarrest_stick", "weapon_lordi_sledgehammer"},
command = "admin",
max = 5,
salary = 0,
admin = 2,
vote = false,
hasLicense = true,
})
TEAM_HOBO = DarkRP.createJob("Hobo", {
color = Color(100, 50, 0, 255),
model = "models/player/danboard.mdl",
description = [[You're homeless, You beg for your income.]],
weapons = {"weapon_bugbait"},
command = "hobo",
max = 5,
salary = 0,
admin = 0,
vote = false,
hasLicense = false,
})
TEAM_GUN = DarkRP.createJob("Gundealer", {
color = Color(255, 128, 0, 255),
model = "models/the walking dead survival instincts/daryl_dixon.mdl",
description = [[You sell and distribute firearms.]],
weapons = {""},
command = "gundealer",
max = 2,
salary = 75,
admin = 0,
vote = false,
hasLicense = false,
})
TEAM_HGUN = DarkRP.createJob("Heavy Gundealer", {
color = Color(255, 128, 0, 255),
model = "models/the walking dead survival instincts/merle_dixon.mdl",
description = [[You sell and distribute heavy firearms.]],
weapons = {""},
command = "gundealer",
max = 2,
salary = 75,
admin = 0,
vote = false,
hasLicense = false,
})
TEAM_MAYOR = DarkRP.createJob("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 = true,
mayor = true,
})
TEAM_POLICE = DarkRP.createJob("S.W.A.T.", {
color = Color(25, 25, 170, 255),
model = "models/player/01ar_combine_soldier01.mdl",
description = [[You're called in to handle what CPs can't.]],
weapons = {"arrest_stick", "unarrest_stick", "m9k_m92beretta", "stunstick", "door_ram", "weaponchecker", "m9k_m16a4_acog", "m9k_m3"},
command = "swat",
max = 4,
salary = 80,
admin = 0,
vote = true,
hasLicense = true,
ammo = {},
})
TEAM_CHIEF = DarkRP.createJob("Civil Protection Chief", {
color = Color(20, 20, 255, 255),
model = "models/elispolice/police.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", "m9k_deagle", "stunstick", "door_ram", "weaponchecker", "m9k_m3"},
command = "chief",
max = 1,
salary = 80,
admin = 0,
vote = false,
hasLicense = true,
chief = true,
NeedToChangeFrom = TEAM_POLICE,
ammo = {},
})
TEAM_POLICE = DarkRP.createJob("Civil Protection", {
color = Color(25, 25, 170, 255),
model = {
"models/humans/nypd1940/male_01.mdl",
"models/humans/nypd1940/male_02.mdl",
"models/humans/nypd1940/male_03.mdl",
"models/humans/nypd1940/male_04.mdl",
"models/humans/nypd1940/male_05.mdl",
"models/humans/nypd1940/male_06.mdl",
"models/humans/nypd1940/male_07.mdl",
"models/humans/nypd1940/male_08.mdl",
"models/humans/nypd1940/male_09.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 their arrest.
The Battering Ram can also unfreeze frozen props (if enabled).
Type /wanted <name> to alert the public to the presence of a criminal.]],
weapons = {"arrest_stick", "unarrest_stick", "m9k_m92beretta", "stunstick", "door_ram", "weaponchecker", "m9k_m4a1"},
command = "cp",
max = 5,
salary = 65,
admin = 0,
vote = true,
hasLicense = true,
ammo = {},
})
TEAM_MAFIA = DarkRP.createJob("Mafia boss", {
color = Color(25, 25, 25, 255),
model = "models/vito.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 = 75,
admin = 0,
vote = false,
hasLicense = false,
})
TEAM_MAFIAMEMBER = DarkRP.createJob("Mafia Member", {
color = Color(75, 75, 75, 255),
model = {
"models/humans/mafia/male_02.mdl",
"models/humans/mafia/male_03.mdl",
"models/humans/mafia/male_04.mdl",
"models/humans/mafia/male_05.mdl",
"models/humans/mafia/male_06.mdl",
"models/humans/mafia/male_07.mdl",
"models/humans/mafia/male_08.mdl",
"models/humans/mafia/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 = 5,
salary = 50,
admin = 0,
vote = false,
hasLicense = false,
})
TEAM_CARTELBOSS = AddExtraTeam("Cartel Boss", {
color = Color(25, 25, 25, 255),
model = "models/player/gman_high.mdl",
description = [[The cartel boss 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 cartel boss also can unarrest you.]],
weapons = {"lockpick", "unarrest_stick"},
command = "mobboss",
max =
Please use [lua] and ['/lua] ( without the ' ) for code.
Line 306, put a comma after the "}".
Please use [code][\/code] tags when posting code.
Oh my gosh, You're a life saver... Sweat over this file for so long, Thanks for the help. And I apologize for not using the code stuff.
Sorry, you need to Log In to post a reply to this thread.