• Spawning as unassigned, in building, tried everything I could think of no luck
    13 replies, posted
I am restarting my server and everything was going fine until today when I installed the backed up addons I used with this server before. I am lost because I am not sure if it is the jobs.lua or an addon because there is no lua error or anything. I also checked the jobs.lua but didn't see anything wrong. Maybe I overlooked but it worked before. i just found this on the server console not sure if this could be the cause. Lua Error: [ERROR] gamemodes/darkrp/gamemode/modules/base/sv_gamemode_functions.lua:606: attempt to index local 'jobTable' (a nil value) 1. unknown - gamemodes/darkrp/gamemode/modules/base/sv_gamemode_functions.lua:606 Lua Error: [ERROR] gamemodes/darkrp/gamemode/modules/base/sv_gamemode_functions.lua:241: attempt to index local 'jobTable' (a nil value) 1. unknown - gamemodes/darkrp/gamemode/modules/base/sv_gamemode_functions.lua:241 Lua Error: [ERROR] gamemodes/darkrp/gamemode/modules/money/sv_money.lua:7: attempt to perform arithmetic on a nil value 1. addMoney - gamemodes/darkrp/gamemode/modules/money/sv_money.lua:7 2. callback - gamemodes/darkrp/gamemode/modules/money/sv_money.lua:33 3. retrieveSalary - gamemodes/darkrp/gamemode/modules/base/sv_data.lua:418 4. payDay - gamemodes/darkrp/gamemode/modules/money/sv_money.lua:25 5. unknown - gamemodes/darkrp/gamemode/modules/jobs/sv_jobs.lua:172 However, I just reinstalled DarkRP, and still get this error. [CODE]/*--------------------------------------------------------------------------- DarkRP custom jobs --------------------------------------------------------------------------- This file contains your custom jobs. This file should also contain jobs from DarkRP that you edited. Note: If you want to edit a default DarkRP job, first disable it in darkrp_config/disabled_defaults.lua Once you've done that, copy and paste the job to this file and edit it. The default jobs can be found here: https://github.com/FPtje/DarkRP/blob/master/gamemode/config/jobrelated.lua For examples and explanation please visit this wiki page: http://wiki.darkrp.com/index.php/DarkRP:CustomJobFields Add jobs under the following line: ---------------------------------------------------------------------------*/ --- Free Jobs TEAM_CIVILIAN = AddExtraTeam("Civilian", { 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 Civilian is the most basic level of society you can hold besides being a hobo. You have no specific role in city life.]], weapons = { "weapon_fists", }, command = "civilian", max = 0, salary = 50, admin = 0, vote = false, hasLicense = false, candemote = false, mayorCanSetSalary = true }) TEAM_POLICE = AddExtraTeam("Police Officer", { color = Color(25, 25, 170, 255), model = {"models/player/nypd/male_02.mdl", "models/player/nypd/male_04.mdl", "models/player/nypd/male_05.mdl", "models/player/nypd/male_06.mdl", "models/player/nypd/male_07.mdl", "models/player/nypd/male_08.mdl", "models/player/nypd/male_09.mdl", "models/player/suits/male_08_shirt_tie.mdl", "models/player/suits/male_04_shirt.mdl", "models/player/suits/male_03_shirt.mdl", "models/player/suits/male_01_shirt_tie.mdl", "models/player/suits/male_02_shirt_tie.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 = { "weapon_fists", "arrest_stick", "unarrest_stick", "door_ram", "weaponchecker", "cw_p99", "weapon_cuff_police"}, command = "police", max = 5, salary = 100, admin = 0, vote = false, hasLicense = true, RequiresVote = function(ply, job) return #team.GetPlayers(job) >= 3 end, }) TEAM_SWAT = AddExtraTeam("S.W.A.T Unit", { color = Color(0, 102, 255, 255), model = {"models/player/swat.mdl"}, description = [[You are a SWAT unit. You assist the government in attacks and government issued raids. Make sure to keep your guard up.]], weapons = { "weapon_fists", "riot_shield", "arrest_stick", "unarrest_stick", "door_ram", "cw_mp5", "weapon_cuff_police"}, command = "swat", max = 5, salary = 100, admin = 0, vote = true, RequiresVote = function(ply, job) return ply:GetNWString("usergroup") ~= "owner" end, hasLicense = true, }) TEAM_FIRE = AddExtraTeam("Fire Fighter", { color = Color(255, 0, 0, 255), model = {"models/fearless/fireman2.mdl"}, description = [[You are a fire fighter, patrol and look for fires!]], weapons = { "weapon_fists", "fire_extinguisher", "fire_axe", "arrest_stick", "unarrest_stick", "door_ram", "weapon_cuff_police"}, command = "firefighter", max = 5, salary = 85, admin = 0, vote = false, hasLicense = true, }) TEAM_CHIEF = AddExtraTeam("Police Chief", { color = Color(20, 20, 255, 255), model = {"models/player/nypd/male_02.mdl", "models/player/nypd/male_04.mdl", "models/player/nypd/male_05.mdl", "models/player/nypd/male_06.mdl", "models/player/nypd/male_07.mdl", "models/player/nypd/male_08.mdl", "models/player/nypd/male_09.mdl", "models/player/suits/male_08_shirt_tie.mdl", "models/player/suits/male_04_shirt.mdl", "models/player/suits/male_03_shirt.mdl", "models/player/suits/male_01_shirt_tie.mdl", "models/player/suits/male_02_shirt_tie.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 = { "weapon_fists", "arrest_stick", "unarrest_stick", "door_ram", "weaponchecker", "cw_ump45", "weapon_cuff_police"}, command = "policechief", max = 1, salary = 150, admin = 0, vote = true, RequiresVote = function(ply, job) return ply:GetNWString("usergroup") ~= "owner" end, hasLicense = true, chief = true, }) TEAM_MAYOR = AddExtraTeam("Mayor", { color = Color(150, 20, 20, 255), model = {"models/player/breen.mdl", "models/obama/obama.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 Type /unlockdown to end a lockdown]], weapons = { "weapon_fists", }, command = "mayor", max = 1, salary = 200, admin = 0, vote = true, hasLicense = false, RequiresVote = function(ply, job) return ply:GetNWString("usergroup") ~= "owner" end, mayor = true, PlayerDeath = function(ply, weapon, killer) if( ply:Team() == TEAM_MAYOR ) then ply:changeTeam( GAMEMODE.DefaultTeam, true ) for k,v in pairs( player.GetAll() ) do
I've had this happen on my own server a long time ago, I belive it was caused by the job file having a error in the code somewhere. Maybe a ; missing
Off topic but what kind is this server with all those freakin jobs? :v:
[QUOTE=YoutoYokodera;51438750]Off topic but what kind is this server with all those freakin jobs? :v:[/QUOTE] Your generic cancer-filled DarkRP server that's ran by a kid I guess.
Right then backup your darkrp-mod, save it on desktop or something, delete the darkrp-mod from main server, restart server see if error repeats. [editline]4th December 2016[/editline] If you still have some errors i'd happily take a look into your server files. TDC | Seronite Gaming - [url]www.Seronite.com[/url] We are a network constantly looking for new servers to join us.
--[[--------------------------------------------------------------------------- DarkRP custom jobs --------------------------------------------------------------------------- Take a look, you will see a different Try this
[QUOTE=dementedrock;51474806]Right then backup your darkrp-mod, save it on desktop or something, delete the darkrp-mod from main server, restart server see if error repeats. [editline]4th December 2016[/editline] If you still have some errors i'd happily take a look into your server files. TDC | Seronite Gaming - [url]www.Seronite.com[/url] We are a network constantly looking for new servers to join us.[/QUOTE] You mean the Darkrp Modification addon? [QUOTE=xStylo27;51474862]--[[--------------------------------------------------------------------------- DarkRP custom jobs --------------------------------------------------------------------------- Take a look, you will see a different Try this[/QUOTE] Uh...what?
/*--------------------------------------------------------------------------- DarkRP custom jobs --------------------------------------------------------------------------- your looks like this, mine looks like this: --[[--------------------------------------------------------------------------- DarkRP custom jobs ---------------------------------------------------------------------------
[QUOTE=xStylo27;51480292]/*--------------------------------------------------------------------------- DarkRP custom jobs --------------------------------------------------------------------------- your looks like this, mine looks like this: --[[--------------------------------------------------------------------------- DarkRP custom jobs ---------------------------------------------------------------------------[/QUOTE] Weird because I just downloaded the DarkRP modification file from github and it came liek the way mine is
hmm ok...
[QUOTE=xStylo27;51480292]/*--------------------------------------------------------------------------- DarkRP custom jobs --------------------------------------------------------------------------- your looks like this, mine looks like this: --[[--------------------------------------------------------------------------- DarkRP custom jobs ---------------------------------------------------------------------------[/QUOTE] Do you even GLua? Both of those are valid comment syntax.
I think I found it. TEAM_CIVILIAN has a comma by weapons. : weapons = { "weapon_fists" , } delete the comma after "
[QUOTE=xStylo27;51484527]I think I found it. TEAM_CIVILIAN has a comma by weapons. : weapons = { "weapon_fists" , } delete the comma after "[/QUOTE] Once again, do you even GLua? Or even regular Lua for that matter. You [i]are[/i] allowed to have a trailing comma in table syntax.
I found out it is one of the custom jobs but I can't find any errors in the code.
Sorry, you need to Log In to post a reply to this thread.