[ERROR] Please help me with my f4 menu!

Hello Facepunch Members.

I dont know if this is the wrong place to bring this but i will try!.

Please help me this is my error and i can bring my f4 menu up!

[ERROR]



[ERROR] A runtime error has occurred in "addons/darkrpmodification-master/lua/darkrp_customthings/jobs.lua" on line 44.
The best help I can give you is this:

'darkrp' is being indexed like it is a table, but in reality it does not exist (is nil).

Hints:
	- You either have 'something.somethingElse', 'something[somethingElse]' or 'something:somethingElse(more)'. The 'something' here does not exist.

The responsibility for this error lies with (the authors of) one (or more) of these files:
	1. addons/darkrpmodification-master/lua/darkrp_customthings/jobs.lua on line 44
	2. gamemodes/darkrp/gamemode/libraries/fn.lua on line 80
	3. gamemodes/darkrp/gamemode/libraries/modificationloader.lua on line 131
	4. gamemodes/darkrp/gamemode/libraries/modificationloader.lua on line 142
	5. gamemodes/darkrp/gamemode/init.lua on line 81
------- End of Simplerr error -------


[MyCode]



--[[---------------------------------------------------------------------------
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:
---------------------------------------------------------------------------]]



TEAM_ADMIN = DarkRP.createJob("Admin On Duty", {
    color = Color(170, 0, 0, 255),
    model = "models/player/zeus_combine_v2/zeus_combine_v2.mdl",
    description = [[Admin on duty is when you as an admin, is ready to make sure the server stays at its best.
It's up to you to patrol and respond to admin calls.]],
    weapons = {},
    command = "aod",
    max = 0,
    salary = 100,
    admin = 0,
    vote = false,
    hasLicense = false,
        customCheck = function(ply) return ply:GetUserGroup() == "Admin" end,
 
})



--[[---------------------------------------------------------------------------
Define which team joining players spawn into and what team you change to if demoted
---------------------------------------------------------------------------]]
darkrp.DefaultTeam = TEAM_CITIZEN


--[[---------------------------------------------------------------------------
Define which teams belong to civil protection
Civil protection can set warrants, make people wanted and do some other police related things
---------------------------------------------------------------------------]]
darkrp.CivilProtection = {
	[TEAM_POLICE] = true,
	[TEAM_CHIEF] = true,
	[TEAM_MAYOR] = true,
}

--[[---------------------------------------------------------------------------
Jobs that are hitmen (enables the hitman menu)
---------------------------------------------------------------------------]]


Hope you guys can help me, thanks!

-snip-

Remove the custom check and just turn admin = 0, to admin = 1, .

admin = 1 is the same thing as someone being in the “admin” group in ulx or fadmin.

I cant find any custom check Subject_Alpha!

-Emil

Subject_Alpha, I dont understand what i shall do can you give me an example code?

Thanks

-Emil

[editline]22nd July 2015[/editline]

My code is now:



--[[---------------------------------------------------------------------------
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:
---------------------------------------------------------------------------]]



TEAM_ADMIN = DarkRP.createJob("SuperAdmin On Duty", {
        color = Color(80, 45, 0, 255),
        model = "models/player/combine_super_soldier.mdl",
        description = [[Du er en superadmin, du skal s�rge for at tage dig af admin sager og hj�lpe folk!]],
        weapons = {"arrest_stick", "unarrest_stick", "weapon_keypadchecker", "weaponchecker", "lockpick", "weapon_crowbar", "stunstick", "door_ram"},
        command = "superadmin",
        max = 50,
        salary = 200,
        admin = 2,
        vote = false,
        hasLicense = true,
     })


--  0 Alle 1 Admin 2 Superadmin --


TEAM_ADMIN = DarkRP.createJob("Admin On Duty", {
        color = Color(80, 45, 0, 255),
        model = "models/player/combine_super_soldier.mdl",
        description = [[Du er en admin, du skal s�rge for at tage dig af admin sager og hj�lpe folk!]],
        weapons = {"arrest_stick", "unarrest_stick", "weapon_keypadchecker", "weaponchecker"},
        command = "admin",
        max = 100,
        salary = 100,
        admin = 1,
        vote = false,
        hasLicense = true,
     })



--[[---------------------------------------------------------------------------
Define which team joining players spawn into and what team you change to if demoted
---------------------------------------------------------------------------]]
darkrp.DefaultTeam = TEAM_CITIZEN


--[[---------------------------------------------------------------------------
Define which teams belong to civil protection
Civil protection can set warrants, make people wanted and do some other police related things
---------------------------------------------------------------------------]]
darkrp.CivilProtection = {
	[TEAM_POLICE] = true,
	[TEAM_CHIEF] = true,
	[TEAM_MAYOR] = true,
}

--[[---------------------------------------------------------------------------
Jobs that are hitmen (enables the hitman menu)
---------------------------------------------------------------------------]]



And i still getting the same error!

-Emil

[editline]22nd July 2015[/editline]

New error!



---------------------------------------------------------------------------
Redownloading all lightmaps
There is 1 Lua problem!
	Please check your console for more information!
[ERROR] A runtime error has occurred in "lua/darkrp_customthings/jobs.lua" on line -1.
The best help I can give you is this:

GAMEMODE.DefaultTeam is not set to an existing job.

Hints:
	- This may happen when you disable the default citizen job. Make sure you update GAMEMODE.DefaultTeam to the new default team.
	- GAMEMODE.DefaultTeam may be set to a job that does not exist anymore. Did you remove the job you had set to default?
	- The error being in jobs.lua is a guess. This is usually right, but the problem might lie somewhere else.

The responsibility for this error lies with (the authors of) one (or more) of these files:
	jobs.lua, settings.lua, disabled_defaults.lua or any of your other custom files.
------- End of Simplerr error -------

[DarkRP] There is 1 Lua problem!
Please check your console for more information!



Its not detecting the default team. Its shown as [lua]darkrp.DefaultTeam = TEAM_CITIZEN[/lua]

If you have that in the jobsrelated file I would just delete that line.

It should be GAMEMODE not darkrp


GAMEMODE.CivilProtection
GAMEMODE.DefaultTeam


Still got error after i changed it to:



GAMEMODE.CivilProtection
GAMEMODE.DefaultTeam


My error is now:



[ERROR] A runtime error has occurred in "lua/darkrp_customthings/jobs.lua" on line -1.
The best help I can give you is this:
 
GAMEMODE.DefaultTeam is not set to an existing job.
 
Hints:
	- This may happen when you disable the default citizen job. Make sure you update GAMEMODE.DefaultTeam to the new default team.
	- GAMEMODE.DefaultTeam may be set to a job that does not exist anymore. Did you remove the job you had set to default?
	- The error being in jobs.lua is a guess. This is usually right, but the problem might lie somewhere else.
 
The responsibility for this error lies with (the authors of) one (or more) of these files:
	jobs.lua, settings.lua, disabled_defaults.lua or any of your other custom files.
------- End of Simplerr error -------
 
  1. error - [C]:-1
   2. unknown - gamemodes/darkrp/gamemode/libraries/simplerr.lua:467
    3. error - gamemodes/darkrp/gamemode/libraries/fn.lua:80
     4. Call - gamemodes/darkrp/gamemode/modules/base/sv_gamemode_functions.lua:912
      5. Call - gamemodes/darkrp/gamemode/libraries/modificationloader.lua:143
       6. unknown - gamemodes/darkrp/gamemode/init.lua:81


Did you disable the TEAM_CIVILIAN job in the disabled_defaults.lua?

If not, is it still GAMEMODE.DefaultTeam = TEAM_CITIZEN?

My gamemode was darkrp.Deafult… And i changed it to GAMEMODE.Default… but still getting errors!.

Jobs.lua



--[[---------------------------------------------------------------------------
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:
---------------------------------------------------------------------------]]



TEAM_ADMIN = DarkRP.createJob("SuperAdmin On Duty", {
        color = Color(80, 45, 0, 255),
        model = "models/player/combine_super_soldier.mdl",
        description = [[Du er en superadmin, holde styr på spillerne, og holde styr på de andre admins!]],
        weapons = {"arrest_stick", "unarrest_stick", "weapon_keypadchecker", "weaponchecker", "lockpick", "weapon_crowbar", "stunstick", "door_ram"},
        command = "superadmin",
        max = 50,
        salary = 200,
        admin = 2,
        vote = false,
        hasLicense = true,
     })


--  0 Alle 1 Admin 2 Superadmin --


TEAM_ADMIN = DarkRP.createJob("Admin On Duty", {
        color = Color(80, 45, 0, 255),
        model = "models/player/combine_super_soldier.mdl",
        description = [[Du er en admin du skal holde styr på spillerne!]],
        weapons = {"arrest_stick", "unarrest_stick", "weapon_keypadchecker", "weaponchecker"},
        command = "admin",
        max = 100,
        salary = 100,
        admin = 1,
        vote = false,
        hasLicense = true,
     })



--[[---------------------------------------------------------------------------
Define which team joining players spawn into and what team you change to if demoted
---------------------------------------------------------------------------]]
GAMEMODE.DefaultTeam = TEAM_CITIZEN


--[[---------------------------------------------------------------------------
Define which teams belong to civil protection
Civil protection can set warrants, make people wanted and do some other police related things
---------------------------------------------------------------------------]]
GAMEMODE.CivilProtection = {
	[TEAM_POLICE] = true,
	[TEAM_CHIEF] = true,
	[TEAM_MAYOR] = true,
}

--[[---------------------------------------------------------------------------
Jobs that are hitmen (enables the hitman menu)
---------------------------------------------------------------------------]]



disabled_defaults.lua



--[[---------------------------------------------------------------------------
DarkRP disabled defaults
---------------------------------------------------------------------------

DarkRP comes with a bunch of default things:
	- a load of modules
	- default jobs
	- shipments and guns
	- entities (like the money printer)
	and many more

If you want to disable or replace the default things, you should disable them here

Note: if you want to have e.g. edit the official medic job, you MUST disable the default one in this file!
You can copy the medic from DarkRP and paste it in darkrp_config/jobs.lua
---------------------------------------------------------------------------]]


--[[---------------------------------------------------------------------------
The list of modules that are disabled. Set to true to disable, false to enable.
Modules that are not in this list are enabled by default.
---------------------------------------------------------------------------]]
DarkRP.disabledDefaults["modules"] = {
	["afk"]              = true,
	["chatsounds"]       = false,
	["events"]           = false,
	["fpp"]              = false,
	["f1menu"]           = false,
	["f4menu"]           = true,
	["hitmenu"]          = false,
	["hud"]              = false,
	["hungermod"]        = true,
	["playerscale"]      = false,
	["sleep"]            = false,
	["fadmin"]           = false,
}



--[[---------------------------------------------------------------------------
The disabled default jobs. true to disable, false to enable.

NOTE: If you disable a job and remake it, expect things that rely on the job to stop working
e.g. you disable the gundealer and you make a new job as TEAM_GUN. If you want the shipments/door groups/etc. to
work for your custom job, remake them to include your job as well.
---------------------------------------------------------------------------]]
DarkRP.disabledDefaults["jobs"] = {
	["chief"]     = true,
	["citizen"]   = true,
	["cook"]      = false, --Hungermod only
	["cp"]        = true,
	["gangster"]  = true,
	["gundealer"] = true,
	["hobo"]      = true,
	["mayor"]     = true,
	["medic"]     = true,
	["mobboss"]   = true,
}

--[[---------------------------------------------------------------------------
Shipments and pistols
---------------------------------------------------------------------------]]
DarkRP.disabledDefaults["shipments"] = {
	["AK47"]         = true,
	["Desert eagle"] = true,
	["Fiveseven"]    = true,
	["Glock"]        = true,
	["M4"]           = true,
	["Mac 10"]       = true,
	["MP5"]          = true,
	["P228"]         = true,
	["Pump shotgun"] = true,
	["Sniper rifle"] = true,
}

--[[---------------------------------------------------------------------------
Entities
---------------------------------------------------------------------------]]
DarkRP.disabledDefaults["entities"] = {
	["Drug lab"]      = true,
	["Gun lab"]       = false,
	["Money printer"] = true,
	["Microwave"]     = false, --Hungermod only
}

--[[---------------------------------------------------------------------------
Vehicles
(at the moment there are no default vehicles)
---------------------------------------------------------------------------]]
DarkRP.disabledDefaults["vehicles"] = {

}

--[[---------------------------------------------------------------------------
Food
Food is only enabled when hungermod is enabled (see disabled modules above).
---------------------------------------------------------------------------]]
DarkRP.disabledDefaults["food"] = {
	["Banana"]           = false,
	["Bunch of bananas"] = false,
	["Melon"]            = false,
	["Glass bottle"]     = false,
	["Pop can"]          = false,
	["Plastic bottle"]   = false,
	["Milk"]             = false,
	["Bottle 1"]         = false,
	["Bottle 2"]         = false,
	["Bottle 3"]         = false,
	["Orange"]           = false,
}

--[[---------------------------------------------------------------------------
Door groups
---------------------------------------------------------------------------]]
DarkRP.disabledDefaults["doorgroups"] = {
	["Cops and Mayor only"] = false,
	["Gundealer only"]      = false,
}


--[[---------------------------------------------------------------------------
Ammo packets
---------------------------------------------------------------------------]]
DarkRP.disabledDefaults["ammo"] = {
	["Pistol ammo"]  = true,
	["Rifle ammo"]   = true,
	["Shotgun ammo"] = true,
}

--[[---------------------------------------------------------------------------
Agendas
---------------------------------------------------------------------------]]
DarkRP.disabledDefaults["agendas"] = {
	["Gangster's agenda"] = false,
	["Police agenda"] = false,
}

--[[---------------------------------------------------------------------------
Chat groups (chat with /g)
Chat groups do not have names, so their index is used instead.
---------------------------------------------------------------------------]]
DarkRP.disabledDefaults["groupchat"] = {
	[1] = false, -- Police group chat (mayor, cp, chief and/or your custom CP teams)
	[2] = false, -- Group chat between gangsters and the mobboss
	[3] = false, -- Group chat between people of the same team
}

--[[---------------------------------------------------------------------------
Jobs that are hitmen
set to true to disable
---------------------------------------------------------------------------]]
DarkRP.disabledDefaults["hitmen"] = {
	["mobboss"] = false,
}

--[[---------------------------------------------------------------------------
Demote groups
When anyone is demote from any job in this group, they will be temporarily banned
from every job in the group
---------------------------------------------------------------------------]]
DarkRP.disabledDefaults["demotegroups"] = {
	["Cops"]	 = false,
	["Gangsters"]	 = false,
}



Error:



There is 1 Lua problem!
	Please check your console for more information!
[ERROR] A runtime error has occurred in "lua/darkrp_customthings/jobs.lua" on line -1.
The best help I can give you is this:

GAMEMODE.DefaultTeam is not set to an existing job.

Hints:
	- This may happen when you disable the default citizen job. Make sure you update GAMEMODE.DefaultTeam to the new default team.
	- GAMEMODE.DefaultTeam may be set to a job that does not exist anymore. Did you remove the job you had set to default?
	- The error being in jobs.lua is a guess. This is usually right, but the problem might lie somewhere else.

The responsibility for this error lies with (the authors of) one (or more) of these files:
	jobs.lua, settings.lua, disabled_defaults.lua or any of your other custom files.
------- End of Simplerr error -------



Hope some of you out there wanna help me, im very sad about this! <3 :frowning:

-Emil

Error:


GAMEMODE.DefaultTeam is not set to an existing job.

Jobs.lua:


GAMEMODE.DefaultTeam = TEAM_CITIZEN

Disabled_defaults.lua:


DarkRP.disabledDefaults["jobs"] = {
	...
	["citizen"] = true,
	...
}

The citizen job doesn’t exist because you disabled it.
Set ‘[“citizen”]’ to false or copy the citizen job to your Jobs.lua file.

EmilGran. true means they are disabled, false means they are enabled. I’m guessing you tried to disable the cook job and the hungermod but that’s the only thing you kept alive

I remember you CodingBeast from somewhere, but i cant remember!.

https://www.thecodingbeast.com/ :slight_smile:

Now my big problem is now solved by the biggest awesomeness dude!!! <3 :* LOVE YOU Beast!