Shared lua error

On my darkrp server I added custom jobs that check to see if a user is a certain rank on ulx. This is the code I use and the error it throws.

TEAM_SPECIAL = AddExtraTeam(“Special Arms Dealer”, {
color = Color(0, 153, 153, 255),
model = {“models/player/eli.mdl”},
description = [[You sell special weapons and items no one else has access to. Deal wisely, these are illegal.]],
weapons = {},
command = “special”,
max = 3,
salary = 55,
admin = 0,
vote = false,
hasLicense = false,
customCheck = function(ply)
return ply:GetUserGroup() == “donator”
end
})

[ERROR] gamemodes/darkrp/gamemode/shared.lua:212: ‘}’ expected (to close ‘{’ at line 201) near ‘customCheck’

  1. unknown - gamemodes/darkrp/gamemode/shared.lua:0

Does anyone know how to fix this? Any help is greatly appreciated.

Try this

[lua]TEAM_SPECIAL = AddExtraTeam(“Special Arms Dealer”, {
color = Color(0, 153, 153, 255),
model = {“models/player/eli.mdl”},
description = [[You sell special weapons and items no one else has access to. Deal wisely, these are illegal.]],
weapons = {},
command = “special”,
max = 3,
salary = 55,
admin = 0,
vote = false,
hasLicense = false,
customCheck = function(ply)
return ply:IsUserGroup(“donator”)
end
})[/lua]

If that doesn’t work post your whole shared.lua using the lua tags (so its easy to read) and i’ll take a look at it.

That works! That’s awesome. So just so I dont mess this up again could you make it so admins can also use this job? And also tell me what was wrong with my code?

Where it says return ply:IsUserGroup(“donator”) change it to return ply:IsUserGroup(“donator”) or ply:IsSuperAdmin or ply:IsAdmin so it will look like this >>

[lua]TEAM_SPECIAL = AddExtraTeam(“Special Arms Dealer”, {
color = Color(0, 153, 153, 255),
model = {“models/player/eli.mdl”},
description = [[You sell special weapons and items no one else has access to. Deal wisely, these are illegal.]],
weapons = {},
command = “special”,
max = 3,
salary = 55,
admin = 0,
vote = false,
hasLicense = false,
customCheck = function(ply)
return ply:IsUserGroup(“donator”) or ply:IsAdmin() or ply:IsSuperAdmin()
end
})[/lua]

EDIT: I suggest you use the wiki on darkrp for extra help http://wiki.darkrp.com/index.php/Main_Page also if you need help and the wiki just wont work for you feel free to pm me.
Also copy and paste the code above again, my fault I had forgot to put () after IsAdmin and IsSuperAdmin

Hm’ it seems that code throws this error
[lua]
[ERROR] gamemodes/darkrp/gamemode/shared.lua:255: function arguments expected near ‘or’

  1. unknown - gamemodes/darkrp/gamemode/shared.lua:0

[/lua]

Yea read above, should be fixed if you copy code again.

Oh wow, I feel stupid. I know enough to where I should have noticed that. Thanks mate. If I had any money, I would definitely throw some your way. But I don’t. Ha.

No problem. I’m no true lua coder lol I just know enough about darkrp and some basics to fix things.