I was working on my server and as soon as I connected I get a Lua error.
The error is because of my shared.lua file because I tried to add two new classes(TEAM_SWAT and TEAM_MAYORSGAURD). I also made it so that you have to be a gangster first to become a mob boss.
Here is my code:
[CODE]/*--------------------------------------------------------
Default teams. If you make a team above the citizen team, people will spawn with that team!
--------------------------------------------------------*/
TEAM_CITIZEN = AddExtraTeam("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 = 45,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
mayorCanSetSalary = false
})
TEAM_POLICE = AddExtraTeam("Civil Protection", {
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 them with your arrest baton to put them in jail
Bash them with a stunstick and they might learn better than to disobey
the law.
The Battering Ram can break down the door of a criminal with a warrant
for his/her arrest.
The Battering Ram can also unfreeze frozen props(if enabled).
Type /wanted <name> to alert the public to this criminal
OR go to tab and warrant someone by clicking the warrant button]],
weapons = {"arrest_stick", "unarrest_stick", "weapon_glock2", "stunstick", "door_ram", "weaponchecker"},
command = "cp",
max = 4,
salary = 65,
admin = 0,
vote = true,
hasLicense = true,
help = {
"Please don't abuse your job",
"When you arrest someone they are auto transported to jail.",
"They are auto let out of jail after some time",
"Type /warrant [Nick|SteamID|Status ID] to set a search warrant for a player.",
"Type /wanted [Nick|SteamID|Status ID] to alert everyone to a wanted suspect",
"Type /unwanted [Nick|SteamID|Status ID] to clear the suspect",
"Type /jailpos to set the jail position"
}
})
TEAM_GANG = AddExtraTeam("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 Mobboss sets your agenda and you follow it or you might be punished.]],
weapons = {},
command = "gangster",
max = 3,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
mayorCanSetSalary = false
})
TEAM_MOB = AddExtraTeam("Mob boss", {
color = Color(25, 25, 25, 255),
model = "models/player/gman_high.mdl",
description = [[The Mobboss 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 Mobboss also can unarrest you.]],
weapons = {"lockpick", "unarrest_stick"},
command = "mobboss",
max = 1,
salary = 60,
admin = 0,
vote = false,
hasLicense = false,
mayorCanSetSalary = false,
NeedToChangeFrom = TEAM_GANG,
help = {
"As the mob boss, you decide what you want the other Gangsters to do.",
"You get an Unarrest Stick which you can use to break people out of jail.",
"/agenda <Message> Sets the Gangsters' agenda. Use // to go to the next line."
}
})
TEAM_GUN = AddExtraTeam("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.
However, make sure you aren't caught selling guns that are illegal to
the public.
/Buyshipment <name> to Buy a weapon shipment
/Buygunlab to Buy a gunlab that spawns P228 pistols]],
weapons = {},
command = "gundealer",
max = 2,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
mayorCanSetSalary = false
})
TEAM_MEDIC = AddExtraTeam("Medic", {
color = Color(47, 79, 79, 255),
model = "models/player/kleiner.mdl",
description = [[With your medical knowledge,
you heal players to proper
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 = 45,
admin = 0,
vote = false,
hasLicense = false,
medic = true,
mayorCanSetSalary = false
})
TEAM_CHIEF = AddExtraTeam("Civil Protection 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 them with arrest baton to put them in jail.
Bash them with a stunstick and they might learn better than to
disobey 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 this criminal
Type /jailpos to set the Jail Position]],
weapons = {"arrest_stick", "unarrest_stick", "weapon_deagle2", "stunstick", "door_ram", "weaponchecker"},
command = "chief",
max = 1,
salary = 75,
admin = 0,
vote = false,
hasLicense = true,
chief = true,
NeedToChangeFrom = TEAM_POLICE,
help = {
"Please don't abuse your job",
"When you arrest someone they are auto transported to jail.",
"They are auto let out of jail after some time",
"Type /warrant [Nick|SteamID|Status ID] to set a search warrant for a player.",
"Type /wanted [Nick|SteamID|Status ID] to alert everyone to a wanted suspect",
"Type /unwanted [Nick|SteamID|Status ID] to clear the suspect",
"Type /jailpos to set the jail position"
}
})
TEAM_MAYOR = AddExtraTeam("Mayor", {
color = Color(150, 20, 20, 255),
model = "models/player/breen.mdl",
description = [[The Mayor of the city creates laws to serve the greater good
of the people.
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 = 85,
admin = 0,
vote = true,
hasLicense = false,
mayor = true,
help = {
"Type /warrant [Nick|SteamID|Status ID] to set a search warrant for a player.",
"Type /wanted [Nick|SteamID|Status ID] to alert everyone to a wanted suspect.",
"Type /unwanted [Nick|SteamID|Status ID] to clear the suspect.",
"Type /lockdown to initiate a lockdown",
"Type /unlockdown to end a lockdown",
"Type /placelaws to place a screen containing the laws.",
"Type /addlaw and /removelaw to edit the
what is the error?
set sv_kickerrornum 0 in your rcon
hello i think i have found your problem
[CODE]TEAM_S.W.A.T = AddExtraTeam("S.W.A.T Team", {
color = Color(6, 16, 34, 255),
model = {"models/player/urban.mdl", "models/player/gasmask.mdl", "models/player/riot.mdl", "models/player/swat.mdl"},
description = [[You are more powerful then the CP, but not above the law.
You have to follow the same rules as a CP.
The Battering Ram can break down the door of a criminal with a warrant
for his/her arrest.
The Battering Ram can also unfreeze frozen props(if enabled).
You can kill any wanted players at any time.
Go to tab and warrant someone by clicking the warrant button]],
weapons = {"arrest_stick", "weapon_mp52", "stunstick", "door_ram", "weaponchecker"},
command = "swat",
max = 3,
salary = 65,
admin = 0,
vote = false,
swap = true,
hasLicense = true,
help = {
"Please don't abuse your job",
"Type /warrant [Nick|SteamID|Status ID] to set a search warrant for a player.",
"Type /wanted [Nick|SteamID|Status ID] to alert everyone to a wanted suspect",
"Type /unwanted [Nick|SteamID|Status ID] to clear the suspect"
}
})
TEAM_MAYORSGAURD = AddExtraTeam("Mayor's Person Gaurd", {
color = Color(6, 16, 34, 255),
model = {"models/player/barney.mdl"},
description = [[Protect the Mayor with your life.
The Mayors life is within your hands.]],
weapons = {"arrest_stick", "weapon_mp52", "stunstick", "door_ram", "weaponchecker"},
command = "mgaurd",
max = 1,
salary = 80,
admin = 0,
vote = false,
mgaurd = true,
NeedToChangeFrom = TEAM_CHIEF,
hasLicense = true,
help = {
"Please don't abuse your job",
"Type /warrant [Nick|SteamID|Status ID] to set a search warrant for a player.",
"Type /wanted [Nick|SteamID|Status ID] to alert everyone to a wanted suspect",
"Type /unwanted [Nick|SteamID|Status ID] to clear the suspect"
}
})[/CODE]
that code should work if it doesnt then im sorry sir
[QUOTE=rejax;41622397]what is the error?
set sv_kickerrornum 0 in your rcon[/QUOTE]
This is what is in my rcon.vmt
[CODE]"UnlitGeneric"
{
"$basetexture" "FAdmin/icons/RCON"
"$ignorez" 1
"$vertexcolor" 1
"$vertexalpha" 1
}[/CODE]
[QUOTE=rejax;41622397]what is the error?
set sv_kickerrornum 0 in your rcon[/QUOTE]
You mean in server.cfg
[QUOTE=Im_Drew;41625809]You mean in server.cfg[/QUOTE]
yeah yeah, i was thinking console but whatever.
[QUOTE=rejax;41626041]yeah yeah, i was thinking console but whatever.[/QUOTE]
Still, won't this not fix the error? Only bypass it?
yes but that code will allow him to stay in the server long enough to see the lua errors on the players side causing the issues. <---- kidneys
It would be good if you could provide us with the error your getting but anyways, try this:
Change this:
[CODE]TEAM_S.W.A.T = AddExtraTeam("S.W.A.T Team", {[/CODE]
To this:
[CODE]TEAM_SWAT = AddExtraTeam("SWAT Team", {[/CODE]
Sorry, you need to Log In to post a reply to this thread.