Need help with customCheck on ammo.lua and shipments.lua

So I’m trying to make donator ammo’s and shipments.

this is what I have right now:

DarkRP.createAmmoType("pistol", {
	name = "Pistol Ammo Crate (60)",
	model = "models/items/ammocrate_smg1.mdl",
	price = 250,
	amountGiven = 60
    CustomCheckFailMsg = "You don't have the required rank to complete this action!",
    customCheck = function(ply) return CLIENT or
    table.HasValue({"donator", "vipmoderator", "vipadmin", "vipsuperadmin", "vipsuperadmin+", "owner"}, ply:GetNWString("usergroup"))

I’m getting this error:

[ERROR] addons/darkrpmodification-master/lua/darkrp_customthings/ammo.lua:117: '}' expected (to close '{' at line 112) near 'CustomCheckFailMsg'
  1. unknown - addons/darkrpmodification-master/lua/darkrp_customthings/ammo.lua:0


EDIT: I’d also like to know how to put ammo’s into a category because I don’t know why but just adding in category didn’t work.

The error is because you’re missing a comma after the ‘amountGiven’ line

Your custom check should just be:

customCheck = function(ply) return table.HasValue({"donator", "vipmoderator", "vipadmin", "vipsuperadmin", "vipsuperadmin+", "owner"}, ply:GetNWString('usergroup')) end 

To put it into a category just add category = ‘name’