When i join my darkrp server i this lua error i have tried so much to fix it and i cannot do it and its with my donator custom check when i remove my donator custom check its fine please help though, the server hosting company said it is beyond his knowledge in lua and suggested i post it here.
THE ERROR:
[ERROR] addons/darkrpmodification-master/lua/darkrp_customthings/jobs.lua:245: '}' expected (to close '{' at line 233) near 'customCheck'
1. unknown - addons/darkrpmodification-master/lua/darkrp_customthings/jobs.lua:0
My jobs.lua file contains:
--[[---------------------------------------------------------------------------
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_CITIZEN = 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 = [[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 = GAMEMODE.Config.normalsalary,
admin = 0,
vote = false,
hasLicense = false,
candemote = false
})
TEAM_POLICE = DarkRP.createJob("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 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"},
command = "cp",
max = 4,
salary = GAMEMODE.Config.normalsalary * 1.45,
admin = 0,
vote = true,
hasLicense = true
})
TEAM_GANG = DarkRP.createJob("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 = GAMEMODE.Config.normalsalary,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_MOB = DarkRP.createJob("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 = GAMEMODE.Config.normalsalary * 1.34,
admin = 0,
vote = true,
hasLicense = false
})
TEAM_GUN = DarkRP.createJob("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.
Make sure you aren't caught selling illegal firearms to the public! You might get arrested!]],
weapons = {},
command = "gundealer",
max = 2,
salary = GAMEMODE.Config.normalsalary,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_MEDIC = DarkRP.createJob("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 = 3,
salary = GAMEMODE.Config.normalsalary,
admin = 0,
vote = false,
hasLicense = false,
medic = true
})
TEAM_CHIEF = DarkRP.createJob("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", "m9k_m92beretta", "stunstick", "door_ram", "weaponchecker"},
command = "chief",
max = 1,
salary = GAMEMODE.Config.normalsalary * 1.67,
admin = 0,
vote = true,
hasLicense = true,
chief = true
})
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 = GAMEMODE.Config.normalsalary * 1.89,
admin = 0,
vote = true,
hasLicense = false,
mayor = true
})
TEAM_HOBO = DarkRP.createJob("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 = 5,
salary = 0,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
hobo = true
})
TEAM_THIEF = DarkRP.createJob("Thief", {
color = Color(0, 0, 0, 255),
model = "models/player/t_phoenix.mdl",
description = [[You are a thief, rob people, lockpick their house and steal their plants and legal printers.]],
weapons = {"lockpick"}, -- Yo
replace
[code]
TEAM_SS = DarkRP.createJob("Secret Service", {
color = Color(100, 20, 20, 255),
model = "models/player/Combine_Soldier.mdl",
description = [[You are responsible for protecting the mayor.
Take care of the old fellow, he is vanuarable to terrorists all the time! Before he enters a room, you need to make sure its secure.]],
weapons = {"m9k_m92beretta", "stunstick", "weaponchecker", "m9k_mp5"},
command = "ss",
max = 2,
salary = 65,
admin = 0,
vote = true,
hasLicense = false
customCheck = function(ply) return ply:GetUserGroup() == "donator" or ply:IsSuperAdmin() end,
CustomCheckFailMsg = "This job is Donator only!"
})
[/code]
with
[code]
TEAM_SS = DarkRP.createJob("Secret Service", {
color = Color(100, 20, 20, 255),
model = "models/player/Combine_Soldier.mdl",
description = [[You are responsible for protecting the mayor.
Take care of the old fellow, he is vanuarable to terrorists all the time! Before he enters a room, you need to make sure its secure.]],
weapons = {"m9k_m92beretta", "stunstick", "weaponchecker", "m9k_mp5"},
command = "ss",
max = 2,
salary = 65,
admin = 0,
vote = true,
hasLicense = false,
customCheck = function(ply) return ply:GetUserGroup() == "donator" or ply:IsSuperAdmin() end,
CustomCheckFailMsg = "This job is Donator only!"
})
[/code]
And next time use code tags please..
TEAM_SS, missing a comma after hasLicense = false
[editline]21st June 2015[/editline]
Ninja'd
OMG thank you so much I AM SO stupid and it was my fault i told my support guy that i didnt have any other customchecks in my jobs.lua i forgot i made Secret service a donator class I AM SO HAPPY YOU TOLD ME THIS I SPENT 8HRS TRYING TO FIX IT LAST NIGHT AND IT WAS A STUPID COMMA!!!! XD im an idiot again THANK YOU
Sorry, you need to Log In to post a reply to this thread.