Job lua errors

Hi, my jobs are having lua errors and I am not sure what is wrong. Here is the job can anyone help?

TEAM_SWATLEADER = DarkRP.createJob(“SWAT Leader”, {
color = Color(0, 58, 255, 255),
model = {“models/player/bfh_enforcer.mdl”},
description = [[You run the swat team, good luck.]],
weapons = {“m9k_scar”, “m9k_spas12”, “m9k_deagle”},
command = “SWATLEADER”,
max = 1,
salary = 250,
admin = 0,
vote = false,
hasLicense = true,
candemote = true,
category = "SWAT ",
PlayerSpawn = function(ply)
ply:SetMaxHealth(200)
ply:SetHealth(200)
ply:SetArmor(150)
end,
customCheck = function(ply) return
table.HasValue({“Donator”, “superadmin”, “Owner”, “Co-Owner”}, ply:GetNWString(“usergroup”))
end,
CustomCheckFailMsg = “This job is donator only!”,
})

In the future, post the error along with the code, and use


 tags. The code you posted doesn't have an error, but you should be using a hash table instead of table.HasValue where possible. Ex.



– Outside job
local tAllowedGroups = {
[“Donator”] = true,
[“superadmin”] = true,
[“Owner”] = true,
[“Co-Owner”] = true
}

– Inside job
customCheck = function(ply) return tAllowedGroups[ply:GetUserGroup()] end


CustomCheckFailMsg = “This job is donator only!”,

remove the comma at the end and try

Commas on the last element are allowed in Lua.

Thanks for the table fix but it still has this error and if I remove the job it goes on to the next job,

[ERROR] Lua is unable to understand file “darkrp_customthings/jobs.lua” because its author made a mistake around line number 18.
The best help I can give you is this:

Right before the ‘TEAM_SWATLEADER’, Lua expected to read an ‘=’-sign, but it didn’t.

Post the job above it.

That’s the highest job.

Can you post the first 30 lines?

I figured out the error as in the description on making the jobs I accidentally put two q’s while trying to tab out of the gmod