- Initiateur de la discussion
S
SkyNax
Geek
- Messages
- 107
- Score réaction
- 3
- Points
- 80
Bonjour, depuis quelque temps j'ai un problème LUA qui me gène beaucoup mais je sais pas c'est quoi..
[DarkRP] gamemodes/darkrp/gamemode/config/jobrelated.lua:59: table index is nil
1. unknown - gamemodes/darkrp/gamemode/config/jobrelated.lua:59
2. include - [C]:-1
3. unknown - gamemodes/darkrp/gamemode/cl_init.lua:46
Et voici mon Jobrelate :
-- 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.
--------------------------------------------------------]]
if not DarkRP.disabledDefaults["modules"]["hungermod"] then
TEAM_COOK = DarkRP.createJob("Cook", {
color = Color(238, 99, 99, 255),
model = "models/player/mossman.mdl",
description = [[As a cook, it is your responsibility to feed the other members of your city.
You can spawn a microwave and sell the food you make:
/buymicrowave]],
weapons = {},
command = "cook",
max = 2,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
cook = true
})
end
-- Compatibility for when default teams are disabled
TEAM_COOK = TEAM_COOK or -1
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
-- Door groups
AddDoorGroup("Cops and Mayor only", TEAM_CHIEF, TEAM_POLICE, TEAM_MAYOR)
AddDoorGroup("Gundealer only", TEAM_GUN)
-- 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_CITIZEN
-- Teams that belong to Civil Protection
GAMEMODE.CivilProtection = {
[TEAM_POLICE] = true,
[TEAM_COMMISSAIRE] = true,
[TEAM_LEADERGIGN] = true,
[TEAM_GIGN] = true,
[TEAM_SGIGN] = 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,
}
Si vous savez comment m'aider ce serait vraiment très APPRÉCIÉE !!
[DarkRP] gamemodes/darkrp/gamemode/config/jobrelated.lua:59: table index is nil
1. unknown - gamemodes/darkrp/gamemode/config/jobrelated.lua:59
2. include - [C]:-1
3. unknown - gamemodes/darkrp/gamemode/cl_init.lua:46
Et voici mon Jobrelate :
-- 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.
--------------------------------------------------------]]
if not DarkRP.disabledDefaults["modules"]["hungermod"] then
TEAM_COOK = DarkRP.createJob("Cook", {
color = Color(238, 99, 99, 255),
model = "models/player/mossman.mdl",
description = [[As a cook, it is your responsibility to feed the other members of your city.
You can spawn a microwave and sell the food you make:
/buymicrowave]],
weapons = {},
command = "cook",
max = 2,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
cook = true
})
end
-- Compatibility for when default teams are disabled
TEAM_COOK = TEAM_COOK or -1
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
-- Door groups
AddDoorGroup("Cops and Mayor only", TEAM_CHIEF, TEAM_POLICE, TEAM_MAYOR)
AddDoorGroup("Gundealer only", TEAM_GUN)
-- 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_CITIZEN
-- Teams that belong to Civil Protection
GAMEMODE.CivilProtection = {
[TEAM_POLICE] = true,
[TEAM_COMMISSAIRE] = true,
[TEAM_LEADERGIGN] = true,
[TEAM_GIGN] = true,
[TEAM_SGIGN] = 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,
}
Si vous savez comment m'aider ce serait vraiment très APPRÉCIÉE !!