Erreur darkrp non comprise

  • Initiateur de la discussion Valia
  • Date de début
  • Initiateur de la discussion
Valia

Valia

Wanka !
Messages
35
Score réaction
1
Points
80
Bonjour , j'ai un probleme avec cette erreur que je n'arrive pas a régler... merci de m'aider svp :)

L'erreur:

[DarkRP] gamemodes/darkrp/gamemode/modules/base/cl_gamemode_functions.lua:23: attempt to index local 'jobTable' (a nil value)
1. Call - gamemodes/darkrp/gamemode/modules/base/cl_gamemode_functions.lua:23
2. unknown - gamemodes/darkrp/gamemode/modules/base/cl_gamemode_functions.lua:62
 
Deadman69330

Deadman69330

Psychopathe
Messages
2 289
Score réaction
309
Points
290
Une erreur dans tes jobs
 
  • Initiateur de la discussion
Valia

Valia

Wanka !
Messages
35
Score réaction
1
Points
80
Voici mon fichier jobs :

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

For examples and explanation please visit this wiki page:

Add your custom jobs under the following line:
---------------------------------------------------------------------------]]
TEAM_CITOYEN = DarkRP.createJob("Citoyen", {
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 = {"idcard", "weapon_fists", },
command = "citizens",
max = 0,
salary = GAMEMODE.Config.normalsalary,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
category = "Citoyen",
})



TEAM_MAFIA = DarkRP.createJob("Mafieux", {
color = Color(0, 0, 0, 255),
model = {"models/fearless/mafia02.mdl"},
description = [[Vous faites partie de la mafia.]],
weapons = {"idcard", "keys", "lockpick", "weapon_fists", "pocket"},
command = "mafieux",
max = 4,
salary = 100,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
category = "Other",
})

TEAM_PARRAIN = DarkRP.createJob("Parrain", {
color = Color(0, 0, 0, 255),
model = {"models/vito.mdl"},
description = [[Vous êtes le chef de la mafia.]],
weapons = {"idcard", "keys", "lockpick", "weapon_fists", "pocket", "keypad_cracker"},
command = "Parrain",
max = 1,
salary = 200,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
category = "Other",
})


TEAM_VOLEUR = DarkRP.createJob("Voleur", {
color = Color(96, 102, 97, 255),
model = {"models/h-d/2sg/simonplayer.mdl"},
description = [[Vous êtes un voleur]],
weapons = {"idcard", "keys", "lockpick", "weapon_fists", "pocket"},
command = "voleur",
max = 2,
salary = 0,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
category = "Other",
})

TEAM_GARDESECURITE = DarkRP.createJob("Garde de sécurité", {
color = Color(0, 17, 255, 255),
model = {"models/player/guard_pack/guard_01.mdl"},
description = [[Vous êtes garde de sécurité.]],
weapons = {"idcard", "keys", "weapon_fists", "pocket", "m9k_colt1911"},
command = "gardedesecurite",
max = 2,
salary = 100,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
category = "Gouvernement",
})

TEAM_GANGSTER = DarkRP.createJob("Gangster", {
color = Color(78, 85, 90, 255),
model = {"models/player/Group03/male_09.mdl"},
description = [[Vous êtes gangster.]],
weapons = {"idcard", "keys", "lockpick", "weapon_fists", "pocket"},
command = "ganster",
max = 4,
salary = 100,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
category = "Other",
})

TEAM_BANQUIER = DarkRP.createJob("Banquier", {
color = Color(246, 255, 0, 255),
model = {"models/fearless/gsuit18.mdl"},
description = [[Vous êtes le banquier de la ville.]],
weapons = {"idcard", "weapon_fists", "pocket"},
command = "banquier",
max = 1,
salary = 100,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
category = "Citoyen",
})

TEAM_RAID = DarkRP.createJob("Raid", {
color = Color(8, 0, 255, 255),
model = {"models/player/urban.mdl"},
description = [[Vous êtes le raid de la ville.]],
weapons = {"m9k_mp5sd", "pocket", "weapon_fists", "keypad_cracker", "lockpick", "m9k_acr", "arrest_stick", "stunstick", "idcard", "unarrest_stick"},
command = "raid",
max = 2,
salary = 400,
admin = 0,
vote = true,
hasLicense = true,
candemote = true,
category = "Gouvernement",
})

TEAM_COMMISAIRE = DarkRP.createJob("Commisaire", {
color = Color(8, 0, 255, 255),
model = {"models/player/santosrp/Male_06_santosrp.mdl", "models/player/santosrp/Male_09_santosrp.mdl"},

description = [[Vous êtes le commisaire de la ville.Vous êtes le chef des policiers]],
weapons = {"pocket", "weapon_fists", "keypad_cracker", "lockpick", "arrest_stick", "stunstick", "idcard", "unarrest_stick", "m9k_ragingbull"},
command = "commisaire",
max = 1,
salary = 400,
admin = 0,
vote = true,
hasLicense = true,
candemote = true,
category = "Gouvernement",
})

TEAM_BRAQUEUR = DarkRP.createJob("Braqueur", {
color = Color(255, 161, 0, 255),
model = {"models/player/pd2_chains_p.mdl", "models/player/pd2_dallas_p.mdl", "models/player/pd2_hoxton_p.mdl", "models/player/pd2_wolf_p.mdl"},
description = [[Vous êtes braqueur]],
weapons = {"pocket", "weapon_fists", "lockpick", "idcard"},
command = "braqueur",
max = 4,
salary = 100,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
category = "Other",
})
-- People often copy jobs. When they do, the GM table does not exist anymore.
-- This line makes the job code work both inside and outside of gamemode files.
-- You should not copy this line into your code.
local GAMEMODE = GAMEMODE or GM
--[[--------------------------------------------------------
Default teams. Please do not edit this file. Please use the darkrpmod addon instead.
--------------------------------------------------------]]

-- Compatibility for when default teams are disabled
TEAM_CITIZEN = TEAM_CITIZEN or -1
TEAM_POLICE = TEAM_POLICE or -1
TEAM_GANG = TEAM_GANG or -1
TEAM_MOB = TEAM_MOB or -1
TEAM_GUN = TEAM_GUN or -1
TEAM_MEDIC = TEAM_MEDIC or -1
TEAM_CHIEF = TEAM_CHIEF or -1
TEAM_MAYOR = TEAM_MAYOR or -1
TEAM_HOBO = TEAM_HOBO or -1
TEAM_COOK = TEAM_COOK or -1

-- Door groups
AddDoorGroup("Gouvernement", TEAM_COMMISAIRE, TEAM_RAID)


-- Agendas
DarkRP.createAgenda("Gangster's agenda", TEAM_MOB, {TEAM_GANG})
DarkRP.createAgenda("Police agenda", {TEAM_MAYOR, TEAM_CHIEF}, {TEAM_POLICE})

-- Group chats
DarkRP.createGroupChat(function(ply) return ply:isCP() end)
DarkRP.createGroupChat(TEAM_MOB, TEAM_GANG)
DarkRP.createGroupChat(function(listener, ply) return not ply or ply:Team() == listener:Team() end)

-- Initial team when first spawning

GAMEMODE.DefaultTeaM = TEAM_CITOYEN

-- Teams that belong to Civil Protection
GAMEMODE.CivilProtection = {
[TEAM_POLICE] = true,
[TEAM_CHIEF] = true,
[TEAM_MAYOR] = true,
}

-- Hitman team
DarkRP.addHitmanTeam(TEAM_MOB)

-- Demote groups
DarkRP.createDemoteGroup("Cops", {TEAM_POLICE, TEAM_CHIEF})
DarkRP.createDemoteGroup("Gangsters", {TEAM_GANG, TEAM_MOB})

-- Default categories
DarkRP.createCategory{
name = "Citizens",
categorises = "jobs",
startExpanded = true,
color = Color(0, 107, 0, 255),
canSee = fp{fn.Id, true},
sortOrder = 100,
}

DarkRP.createCategory{
name = "Civil Protection",
categorises = "jobs",
startExpanded = true,
color = Color(25, 25, 170, 255),
canSee = fp{fn.Id, true},
sortOrder = 101,
}

DarkRP.createCategory{
name = "Gangsters",
categorises = "jobs",
startExpanded = true,
color = Color(75, 75, 75, 255),
canSee = fp{fn.Id, true},
sortOrder = 101,
}

DarkRP.createCategory{
name = "Other",
categorises = "jobs",
startExpanded = true,
color = Color(0, 107, 0, 255),
canSee = fp{fn.Id, true},
sortOrder = 255,
}

--[[---------------------------------------------------------------------------
Define which team joining players spawn into and what team you change to if demoted
---------------------------------------------------------------------------]]
GAMEMODE.DefaultTeam = TEAM_CITOYEN
--[[---------------------------------------------------------------------------
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)
---------------------------------------------------------------------------]]
DarkRP.addHitmanTeam(TEAM_MOB)

je ne vois pas ou est l'erreur :/
 
Deadman69330

Deadman69330

Psychopathe
Messages
2 289
Score réaction
309
Points
290
Pourquoi t'a des categories et plein de trucs dans ton fichier jobs.lua ?
Normalement tu les met dans les fichiers correspondant :/
 
  • Initiateur de la discussion
Valia

Valia

Wanka !
Messages
35
Score réaction
1
Points
80
ben c'est les categorie de defaus jsp moi
:/
 
Deadman69330

Deadman69330

Psychopathe
Messages
2 289
Score réaction
309
Points
290
Valia à dit:
ben c'est les categorie de defaus jsp moi
:/
Ok alors ce que tu va faire c'est remplacer ton fichier jobs.lua par ça:

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:
github.com
FPtje/DarkRP
DarkRP, a non-serious roleplay gamemode for Garry's Mod. - FPtje/DarkRP
github.com github.com
For examples and explanation please visit this wiki page:
DarkRP:CustomJobFields - Official DarkRP Wiki
wiki.darkrp.com
Add your custom jobs under the following line:
---------------------------------------------------------------------------]]
TEAM_CITOYEN = DarkRP.createJob("Citoyen", {
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 = {"idcard", "weapon_fists", },
command = "citizens",
max = 0,
salary = GAMEMODE.Config.normalsalary,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
category = "Citoyen",
})
TEAM_MAFIA = DarkRP.createJob("Mafieux", {
color = Color(0, 0, 0, 255),
model = {"models/fearless/mafia02.mdl"},
description = [[Vous faites partie de la mafia.]],
weapons = {"idcard", "keys", "lockpick", "weapon_fists", "pocket"},
command = "mafieux",
max = 4,
salary = 100,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
category = "Other",
})
TEAM_PARRAIN = DarkRP.createJob("Parrain", {
color = Color(0, 0, 0, 255),
model = {"models/vito.mdl"},
description = [[Vous êtes le chef de la mafia.]],
weapons = {"idcard", "keys", "lockpick", "weapon_fists", "pocket", "keypad_cracker"},
command = "Parrain",
max = 1,
salary = 200,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
category = "Other",
})
TEAM_VOLEUR = DarkRP.createJob("Voleur", {
color = Color(96, 102, 97, 255),
model = {"models/h-d/2sg/simonplayer.mdl"},
description = [[Vous êtes un voleur]],
weapons = {"idcard", "keys", "lockpick", "weapon_fists", "pocket"},
command = "voleur",
max = 2,
salary = 0,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
category = "Other",
})
TEAM_GARDESECURITE = DarkRP.createJob("Garde de sécurité", {
color = Color(0, 17, 255, 255),
model = {"models/player/guard_pack/guard_01.mdl"},
description = [[Vous êtes garde de sécurité.]],
weapons = {"idcard", "keys", "weapon_fists", "pocket", "m9k_colt1911"},
command = "gardedesecurite",
max = 2,
salary = 100,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
category = "Gouvernement",
})
TEAM_GANGSTER = DarkRP.createJob("Gangster", {
color = Color(78, 85, 90, 255),
model = {"models/player/Group03/male_09.mdl"},
description = [[Vous êtes gangster.]],
weapons = {"idcard", "keys", "lockpick", "weapon_fists", "pocket"},
command = "ganster",
max = 4,
salary = 100,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
category = "Other",
})
TEAM_BANQUIER = DarkRP.createJob("Banquier", {
color = Color(246, 255, 0, 255),
model = {"models/fearless/gsuit18.mdl"},
description = [[Vous êtes le banquier de la ville.]],
weapons = {"idcard", "weapon_fists", "pocket"},
command = "banquier",
max = 1,
salary = 100,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
category = "Citoyen",
})
TEAM_RAID = DarkRP.createJob("Raid", {
color = Color(8, 0, 255, 255),
model = {"models/player/urban.mdl"},
description = [[Vous êtes le raid de la ville.]],
weapons = {"m9k_mp5sd", "pocket", "weapon_fists", "keypad_cracker", "lockpick", "m9k_acr", "arrest_stick", "stunstick", "idcard", "unarrest_stick"},
command = "raid",
max = 2,
salary = 400,
admin = 0,
vote = true,
hasLicense = true,
candemote = true,
category = "Gouvernement",
})
TEAM_COMMISAIRE = DarkRP.createJob("Commisaire", {
color = Color(8, 0, 255, 255),
model = {"models/player/santosrp/Male_06_santosrp.mdl", "models/player/santosrp/Male_09_santosrp.mdl"},
description = [[Vous êtes le commisaire de la ville.Vous êtes le chef des policiers]],
weapons = {"pocket", "weapon_fists", "keypad_cracker", "lockpick", "arrest_stick", "stunstick", "idcard", "unarrest_stick", "m9k_ragingbull"},
command = "commisaire",
max = 1,
salary = 400,
admin = 0,
vote = true,
hasLicense = true,
candemote = true,
category = "Gouvernement",
})
TEAM_BRAQUEUR = DarkRP.createJob("Braqueur", {
color = Color(255, 161, 0, 255),
model = {"models/player/pd2_chains_p.mdl", "models/player/pd2_dallas_p.mdl", "models/player/pd2_hoxton_p.mdl", "models/player/pd2_wolf_p.mdl"},
description = [[Vous êtes braqueur]],
weapons = {"pocket", "weapon_fists", "lockpick", "idcard"},
command = "braqueur",
max = 4,
salary = 100,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
category = "Other",
})
--[[---------------------------------------------------------------------------
Define which team joining players spawn into and what team you change to if demoted
---------------------------------------------------------------------------]]
GAMEMODE.DefaultTeam = TEAM_CITOYEN
--[[---------------------------------------------------------------------------
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)
---------------------------------------------------------------------------]]
DarkRP.addHitmanTeam(TEAM_MOB)
 
  • Initiateur de la discussion
Valia

Valia

Wanka !
Messages
35
Score réaction
1
Points
80
d'accord
 
  • Initiateur de la discussion
Valia

Valia

Wanka !
Messages
35
Score réaction
1
Points
80
Non tjr la meme erreur :

[DarkRP] gamemodes/darkrp/gamemode/modules/base/cl_gamemode_functions.lua:23: attempt to index local 'jobTable' (a nil value)
1. Call - gamemodes/darkrp/gamemode/modules/base/cl_gamemode_functions.lua:23
2. unknown - gamemodes/darkrp/gamemode/modules/base/cl_gamemode_functions.lua:62
 
Deadman69330

Deadman69330

Psychopathe
Messages
2 289
Score réaction
309
Points
290
Valia à dit:
Non tjr la meme erreur :

[DarkRP] gamemodes/darkrp/gamemode/modules/base/cl_gamemode_functions.lua:23: attempt to index local 'jobTable' (a nil value)
1. Call - gamemodes/darkrp/gamemode/modules/base/cl_gamemode_functions.lua:23
2. unknown - gamemodes/darkrp/gamemode/modules/base/cl_gamemode_functions.lua:62
Tu n'a que cette erreur ? c'est bizarre, vérifie dans toute ta console si tu n'a pas d'autres erreurs
 
Julian51

Julian51

Geek suprême
Messages
31
Score réaction
2
Points
115
vérifie bien le fichier, si ya pas un oublie de virgule ou autre.
 
  • J'aime
Réactions: Jo Ballas
Jo Ballas

Jo Ballas

Geek suprême
Messages
561
Score réaction
103
Points
150
weapons = {"idcard", "weapon_fists", },
Remplace par ceci
weapons = {"idcard", "weapon_fists"},
 
Jo Ballas

Jo Ballas

Geek suprême
Messages
561
Score réaction
103
Points
150
Au pire, prenez ce fichier je ne l'utilise plus depuis un moment, mais si cela peu vous dépannez.
--[[--------------------------------------------------------------------------- - Pastebin.com
 
Discord d'entraide
Rejoignz-nous sur Discord