I need help and I have tried to research and find the code that is wrong, but the only thing I have been able to complish is figure that my error is not working due to my shared.lua, classes and other information.
The Lua error is this...
[CODE][ERROR] gamemodes/darkrp/gamemode/client/showteamstabs.lua:547: bad argument #1 to 'concat' (table expected, got string)
1. concat - [C]:-1
2. Update - gamemodes/darkrp/gamemode/client/showteamtabs.lua:547
3. JobsTab - gamemodes/darkrp/gamemode/client/showteamtabs.lua:561
4. unknown - gamemodes/darkrp/gamemode/client/vgui.lua:273
5. unknown - gamemodes/darkrp/gamemode/cl_init.lua:236[/CODE]
A few things I can tell you, I have modified ammotypes.lua, shared.lua, and addentities.lua.
I have added a few entities but they have worked in the past and are untouched.
My errors are pointing at the shared.lua based on research I have looked over on the subject and looking at the code.
I HAVE NOT touched vgui, cl_init, or showteamtabs.lua.
I have searched through the shared.lua (Below) and I can not find any problems with it, but maybe you guys would find better luck. Please give advice or help. Much appreciated. Ask for information if you need it.
[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
})
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", "m9k_m92berreta", "stunstick", "door_ram", "weaponchecker"},
command = "cp",
max = 4,
salary = 65,
admin = 0,
vote = true,
hasLicense = true,
})
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
})
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 efficent 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,
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_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
})
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 can not 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 = 2,
salary = 45,
admin = 0,
vote = false,
hasLicense = 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 forces to bring law to 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", "m9k_m92berreta", "m9k_ak47", "stunstick", "door_ram", "weaponchecker"},
command = "chief",
max = 1,
salary = 75,
admin = 0,
vote = false,
hasLicense = true,
NeedToChangeFrom = TEAM_POLICE,
})
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,
})
//ADD CUSTOM TEAMS UNDER THIS LINE:
TEAM_BODY = AddExtraTeam("Bodyguard", {
color = Color(150, 25, 25, 255),
model = "models/player/Barney.mdl",
description = [[Get paid to protect people.]],
weapons = {"m9k_m92berreta", "weaponchecker", "stunstick"},
command = "Bodyguard",
max = 2,
salary = 55,
admin = 0,
vote = true,
hasLicense = true
})
TEAM_THIEF = AddExtraT
Could you put this code ?
[ERROR] gamemodes/darkrp/gamemode/client/showteamstabs.lua:547: bad argument #1 to 'concat' (table expected, got string)
[QUOTE=divineGSK;42268941]Could you put this code ?
[ERROR] gamemodes/darkrp/gamemode/client/showteamstabs.lua:547: bad argument #1 to 'concat' (table expected, got string)[/QUOTE]
Put the code where? Its my error. I don't understand Divine.
Could you share the code in showteamstabs here please.
[CODE]CreateClientConVar("rp_playermodel", "", true, true)
local function MayorOptns()
local MayCat = vgui.Create("DCollapsibleCategory")
function MayCat:Paint()
self:SetBGColor(team.GetColor(LocalPlayer():Team()))
end
MayCat:SetLabel("Mayor options")
local maypanel = vgui.Create("DListLayout")
maypanel:SetSize(740,170)
local SearchWarrant = maypanel:Add("DButton")
SearchWarrant:SetText(DarkRP.getPhrase("searchwarrantbutton"))
SearchWarrant.DoClick = function()
local menu = DermaMenu()
for _,ply in pairs(player.GetAll()) do
if not ply:getDarkRPVar("warrant") and ply ~= LocalPlayer() then
menu:AddOption(ply:Nick(), function()
Derma_StringRequest("Warrant", "Why would you warrant "..ply:Nick().."?", nil,
function(a)
RunConsoleCommand("darkrp", "/warrant", ply:SteamID(), a)
end,
function() end )
end)
end
end
menu:Open()
end
local Warrant = maypanel:Add("DButton")
Warrant:SetText(DarkRP.getPhrase("make_wanted"))
Warrant.DoClick = function()
local menu = DermaMenu()
for _,ply in pairs(player.GetAll()) do
if not ply:getDarkRPVar("wanted") and ply ~= LocalPlayer() then
menu:AddOption(ply:Nick(), function() Derma_StringRequest("wanted", "Why would you make "..ply:Nick().." wanted?", nil,
function(a)
RunConsoleCommand("darkrp", "/wanted", ply:SteamID(), a)
end,
function() end )
end)
end
end
menu:Open()
end
local UnWarrant = maypanel:Add("DButton")
UnWarrant:SetText(DarkRP.getPhrase("make_unwanted"))
UnWarrant.DoClick = function()
local menu = DermaMenu()
for _,ply in pairs(player.GetAll()) do
if ply:getDarkRPVar("wanted") and ply ~= LocalPlayer() then
menu:AddOption(ply:Nick(), function() LocalPlayer():ConCommand("darkrp /unwanted \"" .. ply:SteamID() .. "\"") end)
end
end
menu:Open()
end
local Lockdown = maypanel:Add("DButton")
Lockdown:SetText(DarkRP.getPhrase("initiate_lockdown"))
Lockdown.DoClick = function()
LocalPlayer():ConCommand("darkrp /lockdown")
end
local UnLockdown = maypanel:Add("DButton")
UnLockdown:SetText(DarkRP.getPhrase("stop_lockdown"))
UnLockdown.DoClick = function()
LocalPlayer():ConCommand("darkrp /unlockdown")
end
local Lottery = maypanel:Add("DButton")
Lottery:SetText(DarkRP.getPhrase("start_lottery"))
Lottery.DoClick = function()
LocalPlayer():ConCommand("darkrp /lottery")
end
local GiveLicense = maypanel:Add("DButton")
GiveLicense:SetText(DarkRP.getPhrase("give_license_lookingat"))
GiveLicense.DoClick = function()
LocalPlayer():ConCommand("darkrp /givelicense")
end
local PlaceLaws = maypanel:Add("DButton")
PlaceLaws:SetText("Place a screen containing the laws.")
PlaceLaws.DoClick = function()
LocalPlayer():ConCommand("darkrp /placelaws")
end
local AddLaws = maypanel:Add("DButton")
AddLaws:SetText("Add a law.")
AddLaws.DoClick = function()
Derma_StringRequest("Add a law", "Type the law you would like to add here.", "", function(law)
RunConsoleCommand("darkrp", "/addlaw", law)
end)
end
local RemLaws = maypanel:Add("DButton")
RemLaws:SetText("Remove a law.")
RemLaws.DoClick = function()
Derma_StringRequest("Remove a law", "Enter the number of the law you would like to remove here.", "", function(num)
LocalPlayer():ConCommand("darkrp /removelaw " .. num)
end)
end
MayCat:SetContents(maypanel)
MayCat:SetSkin(GAMEMODE.Config.DarkRPSkin)
return MayCat
end
local function CPOptns()
local CPCat = vgui.Create("DCollapsibleCategory")
function CPCat:Paint()
self:SetBGColor(team.GetColor(LocalPlayer():Team()))
end
CPCat:SetLabel("Police options")
local CPpanel = vgui.Create("DListLayout")
CPpanel:SetSize(740,170)
local SearchWarrant = CPpanel:Add("DButton")
SearchWarrant:SetText(DarkRP.getPhrase("request_warrant"))
SearchWarrant.DoClick = function()
local menu = DermaMenu()
for _,ply in pairs(player.GetAll()) do
if not ply:getDarkRPVar("warrant") and ply ~= LocalPlayer() then
menu:AddOption(ply:Nick(), function()
Derma_StringRequest("Warrant", "Why would you warrant "..ply:Nick().."?", nil,
function(a)
RunConsoleCommand("darkrp", "/warrant", ply:SteamID(), a)
end,
function() end )
end)
end
end
menu:Open()
end
local Warrant = CPpanel:Add("DButton")
Warrant:SetText(DarkRP.getPhrase("searchwarrantbutton"))
Warrant.DoClick = function()
local menu = DermaMenu()
for _,ply in pairs(player.GetAll()) do
if not ply:getDarkRPVar("wanted") and ply ~= LocalPlayer() then
menu:AddOption(ply:Nick(), function()
Derma_StringRequest("wanted", "Why would you make "..ply:Nick().." wanted?", nil,
function(a)
if not IsValid(ply) then return end
RunConsoleCommand("darkrp", "/wanted", ply:SteamID(), a)
end,
function() end )
end)
end
end
menu:Open()
end
local UnWarrant = CPpanel:Add("DButton")
UnWarrant:SetText(DarkRP.getPhrase("unwarrantbutton"))
UnWarrant.DoClick = function()
local menu = DermaMenu()
for _,ply in pairs(player.GetAll()) do
if ply:getDarkRPVar("wanted") and ply ~= LocalPlayer() then
menu:AddOption(ply:Nick(), function() LocalPlayer():ConCommand("darkrp /unwanted \"" .. ply:SteamID() .. "\"") end)
end
end
menu:Open()
end
if LocalPlayer():Team() == TEAM_CHIEF and GAMEMODE.Config.chiefjailpos or LocalPlayer():IsAdmin() then
local SetJailPos = CPpanel:Add("DButton")
SetJailPos:SetText(DarkRP.getPhrase("set_jailpos"))
SetJailPos.DoClick = function() LocalPlayer():ConCommand("darkrp /jailpos") end
local AddJailPos = CPpanel:Add("DButton")
AddJailPos:SetText(DarkRP.getPhrase("add_jailpos"))
AddJailPos.DoClick = function() LocalPlayer():ConCommand("darkrp /addjailpos") end
end
local ismayor -- Firstly look if there's a mayor
local ischief -- Then if there's a chief
for k,v in pairs(player.GetAll()) do
if v:Team() == TEAM_MAYOR then
ismayor = true
break
end
end
if not ismayor then
for k,v in pairs(player.GetAll()) do
if v:Team() == TEAM_CHIEF then
ischief = true
break
end
end
end
local Team = LocalPlayer():Team()
if not ismayor and (Team == TEAM_CHIEF or (not ischief and Team == TEAM_POLICE)) then
local GiveLicense = CPpanel:Add("DButton")
GiveLicense:SetText(DarkRP.getPhrase("give_license_lookingat"))
GiveLicense.DoClick = function()
LocalPlayer():ConCommand("darkrp /givelicense")
end
end
CPCat:SetContents(CPpanel)
CPCat:SetSkin(GAMEMODE.Config.DarkRPSkin)
return CPCat
end
local function CitOptns()
local CitCat = vgui.Create("DCollapsibleCategory")
function CitCat:Paint()
self:SetBGColor(team.GetColor(LocalPlayer():Team()))
end
CitCat:SetLabel("Citizen options")
local Citpanel = vgui.Create("DListLayout")
Citpanel:SetSize(740,110)
local joblabel = Citpanel:Add("DLabel")
joblabel:SetText(DarkRP.getPhrase("set_custom_job"))
local jobentry = Citpanel:Add("DTextEntry")
jobentry:SetAllowNonAsciiCharacters(true)
jobentry:SetValue(LocalPlayer():getDarkRPVar("job") or "")
jobentry.OnEnter = function()
RunConsoleCommand("DarkRP", "/job", tostring(jobentry:GetValue()))
end
CitCat:SetContents(Citpanel)
CitCat:SetSkin(GAMEMODE.Config.DarkRPSkin)
return CitCat
end
local function MobOptns()
local MobCat = vgui.Create("DCollapsibleCategory")
function MobCat:Paint()
self:SetBGColor(team.GetColor(LocalPlayer():Team()))
end
MobCat:SetLabel("Mobboss options")
local Mobpanel = vgui.Create("DListLayout")
Mobpanel:SetSize(740,110)
local agendalabel = Mobpanel:Add("DLabel")
agendalabel:SetText(DarkRP.getPhrase("set_agenda"))
local agendaentry = Mo
Applied that change, nothing differed. It did exactly what happened before.
Anyways, i'll give the shared file that works on my server. I fixed it there. Should work on yours?
[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 = true
})
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 a player with your arrest baton to put them in jail
Bash a player with a stunstick and they may learn to obey
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 the presence of a 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 Mob boss 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 Mob boss 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 Mob boss posesses the ability to unarrest you.]],
weapons = {"lockpick", "unarrest_stick"},
command = "mobboss",
max = 1,
salary = 60,
admin = 0,
vote = false,
hasLicense = false,
mayorCanSetSalary = false,
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 illegal firearms 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 = true
})
TEAM_MEDIC = AddExtraTeam("Medic", {
color = Color(47, 79, 79, 255),
model = "models/player/kleiner.mdl",
description = [[With your medical knowledge,
you work to restore players to full 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 = true
})
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 a player with arrest baton to put them in jail.
Bash a player with a stunstick and they may learn to
obey 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 the presence of a 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 govern the city.
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 laws."
}
})
TEAM_HOBO = AddExtraTeam("Hobo", {
color = Color(80, 45, 0, 255),
model = "models/player/corpse1.mdl",
description = [[The lowest member of society. Everybody laughs at you.
You have no ho
[QUOTE=brandonj4;42269274]Sorry but that's not how tables work.
[lua]
GM.CivilProtection = {
[TEAM_POLICE] = true,
[TEAM_CHIEF] = true,
[TEAM_MAYOR] = true,
[TEAM_ADMIN] = true,
[TEAM_SWAT] = true,
[TEAM_SNIPER] = true
}
[/lua][/QUOTE]
That's actually how you get it from the github file.
Double Checking, I was uploading to a backup darkrp (really old one) apparently instead of my main darkrp folder. So essentially I was thinking I was updating darkrp when I wasn't. I will edit with the results of whether it works or not.
[url]http://pastebin.com/M4aJBpMS[/url]
Sorry, i put the wrong shared file few replies ago.
[QUOTE=divineGSK;42269284]That's actually how you get it from the github file.[/QUOTE]
[IMG]http://puu.sh/4x93g.png[/IMG]
Sure it is.
Did you use the right file Mark?
[url]http://pastebin.com/M4aJBpMS[/url]
Keep me posted please.
[url]http://pastebin.com/jNy5EVEy[/url]
That is my current shared.lua
After doing what you guys have done, (brandonj was wrong, that created an error and promptly fixed it, thanks guys)
I have a new error that does not make too much sense >.>
[ERROR] gamemodes/darkrp/gamemode/shared.lua:564: '}' expected (to close '{' at line 562) near '['
1. unknown - gamemodes/darkrp/gamemode/shared.lua:0
[QUOTE=MarkHa10;42269697][url]http://pastebin.com/jNy5EVEy[/url]
That is my current shared.lua
After doing what you guys have done, (brandonj was wrong, that created an error and promptly fixed it, thanks guys)
I have a new error that does not make too much sense >.>
[ERROR] gamemodes/darkrp/gamemode/shared.lua:564: '}' expected (to close '{' at line 562) near '['
1. unknown - gamemodes/darkrp/gamemode/shared.lua:0[/QUOTE]
I'm sorry but you are just terrible. Read my post and do as I did, it will fix your error.
[QUOTE=MarkHa10;42269697][url]http://pastebin.com/jNy5EVEy[/url]
That is my current shared.lua
After doing what you guys have done, (brandonj was wrong, that created an error and promptly fixed it, thanks guys)
I have a new error that does not make too much sense >.>
[ERROR] gamemodes/darkrp/gamemode/shared.lua:564: '}' expected (to close '{' at line 562) near '['
1. unknown - gamemodes/darkrp/gamemode/shared.lua:0[/QUOTE]
Brandon is right, tables do work that way.
Sorry, brandon, wrong name, I meant you were right, divine, he snipped so I wasn't paying attention as I am currently multitasking. Sorry to be disrespectful.
[editline]22nd September 2013[/editline]
[ERROR] gamemodes/darkrp/gamemode/client/showteamtabs.lua:547: bad argument #1 to 'concat' (table expected, got string)
1. concat - [C]:-1
2. Update - gamemodes/darkrp/gamemode/client/showteamtabs.lua:547
3. JobsTab - gamemodes/darkrp/gamemode/client/showteamtabs.lua:561
4. unknown - gamemodes/darkrp/gamemode/client/vgui.lua:273
5. unknown - gamemodes/darkrp/gamemode/cl_init.lua:236
Same Error, I pastebined my MOST current shared.lua. And, I have done what you asked brandonj, but it didn't work and solve my problem.
[url]http://pastebin.com/WU1dJS78[/url]
That shared.lua file works fine for me.
What revision of DarkRP are you running?
[editline]22nd September 2013[/editline]
@Nookyava & BrandonJ
Tables work like that if they are defined. Wich they are
Sorry, you need to Log In to post a reply to this thread.