Something's wrong here.. ._.

This is the error I’m getting:

[ERROR] gamemodes/darkrp/gamemode/config/jobrelated.lua:249: ‘end’ expected near ‘=’

  1. unknown - gamemodes/darkrp/gamemode/config/jobrelated.lua:0

Here’s my code:

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_HITMAN = DarkRP.createJob(“Hitman”, {
color = Color(9, 107, 27, 255),
model = {
“models/player/arctic.mdl”,
},
description = [[A hitman accepts hits from other players. Whoever the hit is on, you must kill them. Be careful while doing this. When you accept a hit, /advert Hit Accepted and when you complete the hit, /advert Hit Completed. If you fail to complete your hit, /advert Hit Failed.]],
weapons = {“knife”},
command = “hitman”,
max = 2,
salary = 65,
admin = 0,
vote = true,
hasLicense = false,
candemote = false,

})
// TEMPLATE FOR NON=DONATORS
TEAM_THIEF = DarkRP.createJob(“Thief”, {
color = Color(64, 8, 8, 255),
model = “models/player/Phoenix.mdl”,
description = [[The most basic raiding job of them all.]],
weapons = {“lockpick”, “knife”},
command = “thief”,
max = 3,
salary = 80,
admin = 0,
vote = true,
hasLicense = false,
candemote = true,
})

TEAM_SOD = DarkRP.createJob(“Admin On Duty”, {
color = Color(255, 0, 0, 255),
model = “models/player/daftpunk/daft_gold.mdl”,
description = [[This is the Staff rank. You must enforce all rules.]],
weapons = {“arrest_stick”, “unarrest_stick”},
command = “sod”,
max = 10,
salary = 10000,
admin = 1,
vote = false,
hasLicense = true,
candemote = true,
})

TEAM_SWAT = DarkRP.createJob(“SWAT”, {
color = Color(0, 0, 255, 255),
model = “models/player/riot.mdl”,
description = [[You are SWAT. You must protect the mayor, and the rest of the city. You also take orders from the SWAT Chief and the Mayor. ]],
weapons = {“arrest_stick”, “unarrest_stick”, “weapon_stunstick”, “battering_ram”, “weapon_checker”, “vgui/hud/m9k_g36”, “vgui/hud/m9k_m24”},
command = “swat”,
max = 3,
salary = 200,
admin = 0,
vote = true,
hasLicense = true,
candemote = true,
})

TEAM_GUARD = DarkRP.createJob(“Private Security”, {
color = Color(255, 0, 224, 255),
model = “models/player/starwars/bdroidcommander.mdl”,
description = [[You are a private security. You must guard someone’s base, but never guard the mayor. That job is reserved to the Police.]],
weapons = {“weapon_stunstick”, “vgui/hud/m9k_glock”},
command = “privatesecurity”,
max = 4,
salary = 100,
admin = 0,
vote = true,
hasLicense = true,
candemote = true,
})

TEAM_SWAT_HEAVY = DarkRP.createJob(“SWAT Chief”, {
color = Color(0, 0, 255, 255),
model = “models/player/gasmask.mdl”,
description = [[You are the SWAT Chief. You must make sure your team of SWAT members are doing their job correctly. ]],
weapons = {“arrest_stick”, “unarrest_stick”, “battering_ram”, “weapon_stunstick”, “weapon_checker”, “vgui/hud/m9k_g36”, “vgui/hud/m9k_glock”, “vgui/hud/m9k_mp5sd”, “vgui/hud/m9k_m24”},
command = “swatchief”,
max = 1,
salary = 250,
admin = 0,
vote = true,
hasLicense = true,
candemote = true,
})

TEAM_ROYAL = DarkRP.createJob(“Royal”, {
color = Color(26, 101, 240, 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 Royals are heavily involved in the dealing of illegal drugs and other contraband, particularly in prisons where members are incarcerated.]],
weapons = {},
command = “royal”,
max = 4,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
})

TEAM_RLEADER = DarkRP.createJob(“Royal Leader”, {
color = Color(26, 101, 240, 255),
model = “models/player/gman_high.mdl”,
description = [[The Royals Leader controls all of the Royals Gang. You are what the Royals call “The Top Man”. You tell the Royals what to do and you also have the ability to break them out of jail with your un-arrest stick.]],
weapons = {“lockpick”, “unarrest_stick”},
command = “royalleader”,
max = 1,
salary = 60,
admin = 0,
vote = false,
hasLicense = false,
candmote = true,
})

TEAM_IMPERIAL = AddExtraTeam(“Imperial”, {
color = Color(242, 19, 216, 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 Imperials are involved in a high state of crime, they are known from a large amount of Gang Wars with the Royals.]],
weapons = {},
command = “imperial”,
max = 4,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
})

TEAM_ILEADER = AddExtraTeam(“Imperial Leader”, {
color = Color(242, 19, 216, 255),
model = “models/player/gman_high.mdl”,
description = [[The Imperial Leader controls all of the Imperial Gang. You tell the Imperials what to do and you also have the ability to break them out of jail with your un-arrest stick.]],
weapons = {“lockpick”, “unarrest_stick”},
command = “imperialleader”,
max = 1,
salary = 60,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
})

TEAM_GUN = DarkRP.createJob(“Black Market Dealer”, {
color = Color(255, 140, 0, 255),
model = “models/player/warhammer1player.mdl”,
description = [[Black Market Dealers sell illegal equipment and weaponry only. They aren’t to be messed with.]],
weapons = {},
command = “blackmarketdealer”,
max = 3,
salary = 200,
admin = 0,
vote = true,
hasLicense = true,
candemote = true,
})

TEAM_GUN = AddExtraTeam(“Drug Dealer”, {
color = Color(255, 204, 0, 255),
model = “models/player/eli.mdl”,
description = [[Drug Dealers illegaly sell drugs.]],
weapons = {},
command = “drugdealer”,
max = 3,
salary = 60,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
})

TEAM_OWNER = AddExtraTeam(“Server Owner”, {
color = Color(255, 204, 255, 255),
model = “models/player/mikup.mdl”,
description = [[Greetings, Lord, Soda.]],
weapons = {},
command = “owner”,
max = 1,
salary = 1000000,
admin = 1,
vote = false,
hasLicense = false,
candemote = true,
customCheck = function(ply) return ply:GetNWString(“usergroup”) = “Owner” or ply:IsAdmin() end,
CustomCheckFailMsg = “Only the Server Owner can obtain this job!”
})

TEAM_DRUG = AddExtraTeam(“Hacker”, {
color = Color(204, 204, 255, 255),
model = “models/player/anonymous_hacktivist.mdl”,
description = [[Black hat, you are given the ability of advantage. With this advantage comes a keypad cracker. Use it wisely and don’t get caught by the police.]],
weapons = {“keypad_cracker”},
command = “hacker”,
max = 3,
salary = 210,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
})

TEAM_ELITE = DarkRP.createJob(“Elite”, {
color = Color(0, 0, 0, 255),
model = “models/shaklin/payday2/pd2_chains.mdl”,
“models/shaklin/payday2/pd2_dallas.mdl”,
“models/shaklin/payday2/pd2_hoxton.mdl”,
“models/shaklin/payday2/pd2_wolf.mdl”},
description = [[The Elite’s are the thugs you keep your distance from. They’re the reason this city has such a high crime rate.]],
weapons = {“lockpick”, “keypad_cracker”},
command = “elite”,
max = 4,
salary = 300,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
customCheck = function(ply) return ply:GetNWString(“usergroup”) = “vip” or ply:IsAdmin() end,
CustomCheckFailMsg = “This job is VIP only!”
})

TEAM_DRUG = AddExtraTeam(“Pro Thief”, {
color = Color(204, 0, 255, 255),
model = “models/player/Group03/Male_06.mdl”,
description = [[Pro Thief, you know what to do.]],
weapons = {“knife”, “keypad_cracker”},
command = “prothief”,
max = 1,
salary = 250,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
customCheck = function(ply) return ply:GetNWString(“usergroup”) = “VIP” or ply:IsAdmin() end,
CustomCheckFailMsg = “Only VIPs can obtain this job!”
})

TEAM_CITIZEN = AddExtraTeam(“Yoda”, {
color = Color(0, 204, 0, 255),
model = “models/player/b4p/b4p_yoda.mdl”,
description = [[Very green, you are.]],
weapons = {},
command = “yoda”,
max = 1,
salary = 250,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
customCheck = function(ply) return ply:GetNWString(“usergroup”) = “VIP” or ply:IsAdmin() end,
CustomCheckFailMsg = “Only VIPs can obtain this job!”
})

TEAM_CITIZEN = AddExtraTeam(“Darth Vader”, {
color = Color(204, 0, 0, 255),
model = “models/player/b4p/b4p_vader.mdl”,
description = [[You have great power, but horrible respiratory issues.]],
weapons = {},
command = “darthvader”,
max = 1,
salary = 250,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
customCheck = function(ply) return ply:GetNWString(“usergroup”) = “VIP” or ply:IsAdmin() end,
CustomCheckFailMsg = “Only VIPs can obtain this job!”
})

TEAM_CITIZEN = AddExtraTeam(“Teletubby”, {
color = Color(204, 102, 102, 255),
model = “models/humans/teletubbies/tinkywinky_hl2mp_human/tinkywinky_hl2mp_human.mdl”,
“models/humans/teletubbies/dipsy_hl2mp_human/dipsy_hl2mp_human.mdl”,
“models/humans/teletubbies/laalaa_hl2mp_human/laalaa_hl2mp_human.mdl”,
“models/humans/teletubbies/po_hl2mp_human/po_hl2mp_human.mdl”},
description = [[No comment…]],
weapons = {},
command = “teletubby”,
max = 4,
salary = 0,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
})

TEAM_CITIZEN = AddExtraTeam(“Lich King”, {
color = Color(0, 255, 255, 255),
model = “models/player/Lich_King_WoW_masked.mdl”,
description = [[Arthus, you have come from Northrend to Gmod, you’re very confused but know that you will destroy anyone that tries to harm you.]],
weapons = {},
command = “arthus”,
max = 1,
salary = 0,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
customCheck = function(ply) return ply:GetNWString(“usergroup”) = “VIP” or ply:IsAdmin() end,
CustomCheckFailMsg = “Only VIPs can obtain this job!”
})

TEAM_CITIZEN = AddExtraTeam(“Batman”, {
color = Color(0, 0, 0, 255),
model = “models/player/superheroes/batman.mdl”,
description = [[I’m Batman.]],
weapons = {},
command = “batman”,
max = 1,
salary = 0,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
customCheck = function(ply) return ply:GetNWString(“usergroup”) = “VIP” or ply:IsAdmin() end,
CustomCheckFailMsg = “Only VIPs can obtain this job!”
})

TEAM_CITIZEN = AddExtraTeam(“Shades”, {
color = Color(102, 255, 204, 255),
model = “models/captainbigbutt/vocaloid/npc/kuro-miku.mdl”,
description = [[Kicking ass & chewing bubble gum.]],
weapons = {},
command = “shades”,
max = 1,
salary = 10000,
admin = 1,
vote = false,
hasLicense = false,
candemote = true,
customCheck = function(ply) return ply:GetNWString(“usergroup”) = “admin” or ply:IsAdmin() end,
CustomCheckFailMsg = “Only Shades can obtain this job!”
})

TEAM_CITIZEN = AddExtraTeam(“Superman”, {
color = Color(0, 51, 255, 255),
model = “models/player/superheroes/superman.mdl”,
description = [[You are the strongest of all.]],
weapons = {},
command = “superman”,
max = 1,
salary = 0,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
customCheck = function(ply) return ply:GetNWString(“usergroup”) = “VIP” or ply:IsAdmin() end,
CustomCheckFailMsg = “Only VIPs can obtain this job!”
})

TEAM_MAYOR = DarkRP.createJob(“Mayor”, {
color = Color(204, 0, 0, 255),
model = “models/player/magnusson.mdl”,
description = [[You are the Mayor of the city. Your people are depending on you. Create laws, be fair, be loyal.]],
weapons = {},
command = “mayor”,
max = 1,
salary = 300,
admin = 0,
vote = true,
hasLicense = true,
candemote = true,
})

If anyone can explain to me exactly what I’m doing wrong, it’d be greatly appreciated, thanks. c:

Please put your code in: [!CODE]code goes here[!/CODE] minus the !'s.

EDIT: Found it.
At line 242


customCheck = function(ply) return ply:GetNWString("usergroup") = "Owner" or ply:IsAdmin() end,

should be


customCheck = function(ply) return ply:GetNWString("usergroup") == "Owner" or ply:IsAdmin() end,

and same with all the other groups.

Just taking a wild guess here but aren’t your customCheck fields causing issues?


customCheck = function(ply) return ply:GetNWString("usergroup") = "Owner" or ply:IsAdmin() end,

Shouldn’t it be


ply:GetNWString("usergroup") == "Owner"

not


ply:GetNWString("usergroup") = "Owner"

This goes for every customCheck you are using. Lines 242, 275, 291, 307, 323, 356, 372, 388, and 404.

You use = to compare, you need to do


function(ply) return ply:GetNWString("usergroup") == "VIP" or ply:IsAdmin()

instead of



function(ply) return ply:GetNWString("usergroup") = "VIP" or ply:IsAdmin()


Ninja tea is the best tea

You guys beat me to it :smiley: