J'aimerais régler mes erreurs LUA...

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

2612

Geek
Messages
86
Score réaction
10
Points
65
1ère ERREUR LUA :
[ERROR] addons/darkrpmodification-master/lua/darkrp_config/disabled_defaults.lua:50: '}' expected (to close '{' at line 47) near 'only'
1. unknown - addons/darkrpmodification-master/lua/darkrp_config/disabled_defaults.lua:0



2ème ERREUR LUA :
[ERROR] gamemodes/darkrp/gamemode/config/jobrelated.lua:124: unfinished string near '"},'
1. unknown - gamemodes/darkrp/gamemode/config/jobrelated.lua:0
 
Fred-Tension

Fred-Tension

Geek
Messages
51
Score réaction
14
Points
65
Montre moi ton fichier addons/darkrpmodification-master/lua/darkrp_config/disabled_defaults.lua et gamemodes/darkrp/gamemode/config/jobrelated.lua
 
  • Initiateur de la discussion
2612

2612

Geek
Messages
86
Score réaction
10
Points
65
Comment par Capture D'Ecran ?
 
Fred-Tension

Fred-Tension

Geek
Messages
51
Score réaction
14
Points
65
Non les lignes de code
 
  • Initiateur de la discussion
2612

2612

Geek
Messages
86
Score réaction
10
Points
65
ah ok
-- 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.
--------------------------------------------------------]]
TEAM_CITIZEN = DarkRP.createJob("Citoyen", {
color = Color(20, 150, 20, 255),
model = {
"models/player/zelpa/female_01.mdl",
"models/player/zelpa/female_02.mdl",
"models/player/zelpa/female_03.mdl",
"models/player/zelpa/female_06.mdl",
"models/player/zelpa/female_07.mdl",
"models/player/zelpa/male_01.mdl",
"models/player/zelpa/male_02.mdl",
"models/player/zelpa/male_03.mdl",
"models/player/zelpa/male_04.mdl",
"models/player/zelpa/male_07.mdl",
"models/player/zelpa/male_09.mdl",
"models/player/zelpa/male_10.mdl",
"models/player/zelpa/male_11.mdl",
"models/player/zelpa/male_08.mdl"
},
description = [[Vous n'avez pas le droit de posséder d'armes, de faire des alliances avec d'autres métiers et de se convertir à l'illégal..]],
weapons = {"weapon_physcannon", "gmod_camera", "weapon_fists", "weapon_physgun", "gmod_tool", "weapon_arc_atmcard", "keys", "itemstore_pickup"},
command = "citizen",
max = 0,
salary = 15,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
category = "Citizens",
})

TEAM_POLICE = DarkRP.createJob("Policier", {
color = Color(25, 25, 170, 255),
model = {"models/player/santosrp/male_02_santosrp.mdl", "models/player/santosrp/male_04_santosrp.mdl", "models/player/santosrp/male_05_santosrp.mdl", "models/player/santosrp/male_06_santosrp.mdl", "models/player/santosrp/male_06_santosrp.mdl", "models/player/santosrp/male_07_santosrp.mdl", "models/player/santosrp/male_08_santosrp.mdl", "models/player/santosrp/male_09_santosrp.mdl"},
description = [[En tant que policier vous devez vous assurez de la protection de la ville, négociez les prises d'otages, les braquages...]],
weapons = {"weapon_physcannon", "speed_gun", "gmod_camera", "weapon_fists", "weapon_physgun", "gmod_tool", "weapon_arc_atmcard", "keys", "itemstore_pickup", "weaponchecker", "door_ram", "stungun", "policebadgewallet", "weapon_r_handcuffs", "m9k_usp"},
command = "cp",
max = 4,
salary = 65,
admin = 0,
vote = true,
hasLicense = true,
ammo = {
["pistol"] = 60,
},
category = "Civil Protection",
})

TEAM_GANG = DarkRP.createJob("Gangster", {
color = Color(75, 75, 75, 255),
model = "models/dean/robber.mdl",
description = [[Les gangsters sont des voyous qui s'amusent a voler les voitures d'un conducteur, faire des prises d'otages.]],
weapons = {"weapon_physcannon", "gmod_camera", "weapon_fists", "weapon_physgun", "gmod_tool", "weapon_arc_atmcard", "keys", "itemstore_pickup"},
command = "gangster",
max = 4,
salary = 40,
admin = 0,
vote = false,
hasLicense = false,
category = "Gangsters",
})

TEAM_MOB = DarkRP.createJob("Tueur A Gages", {
color = Color(25, 25, 25, 255),
model = {
"models/player/zelpa/female_01.mdl",
"models/player/zelpa/female_02.mdl",
"models/player/zelpa/female_03.mdl",
"models/player/zelpa/female_06.mdl",
"models/player/zelpa/female_07.mdl",
"models/player/zelpa/male_01.mdl",
"models/player/zelpa/male_02.mdl",
"models/player/zelpa/male_03.mdl",
"models/player/zelpa/male_04.mdl",
"models/player/zelpa/male_07.mdl",
"models/player/zelpa/male_09.mdl",
"models/player/zelpa/male_10.mdl",
"models/player/zelpa/male_11.mdl",
"models/player/zelpa/male_08.mdl"
},
description = [[Vous devez vous faire passez pour un nettoyeru de tache HUMAINES...]],
weapons = {"m9k_m98b", "weapon_physcannon", "gmod_camera", "weapon_fists", "weapon_physgun", "gmod_tool", "weapon_arc_atmcard", "keys", "itemstore_pickup"},
command = "mobboss",
max = 1,
salary = 55,
admin = 0,
vote = true,
hasLicense = false,
category = "Gangsters",
})

TEAM_GUN = DarkRP.createJob("Vendeur D'Armes", {
color = Color(255, 140, 0, 255),
model = "models/player/ratedr4ryan/joel_tlou.mdl",
description = [[Vous devez vendre des armes aux habitants de la ville Mais attention si vous la vendez à des gens sans liscence!]],
weapons = {"weapon_physcannon", "gmod_camera", "weapon_fists", "weapon_physgun", "gmod_tool", "weapon_arc_atmcard", "keys", "itemstore_pickup"},
command = "gundealer",
max = 2,
salary = 55,
admin = 0,
vote = false,
hasLicense = true,
category = "Citizens",
})

TEAM_MEDIC = DarkRP.createJob("Médecin", {
color = Color(47, 79, 79, 255),
model = {
"models/humans/medic/female_01.mdl",
"models/humans/medic/female_02.mdl",
"models/humans/medic/male_02.mdl",
"models/humans/medic/male_04.mdl",
"models/humans/medic/male_05.mdl",
"models/humans/medic/male_07.mdl",
"models/humans/medic/male_09.mdl"
},
description = [[Vous devez soignez les gens contre de l'argent.]],
weapons = {"weapon_physcannon", "bn_defib_admin", "gmod_camera", "weapon_fists", "weapon_physgun", "gmod_tool", "weapon_arc_atmcard", "keys", "itemstore_pickup", "med_kit"},
command = "medic",
max = 2,
salary = 65,
admin = 0,
vote = false,
hasLicense = false,
medic = true,
category = "Citizens",
})

TEAM_CHIEF = DarkRP.createJob("Chef Des Forces De L'Ordre", {
color = Color(20, 20, 255, 255),
model = "models/wgrunt/wgrunt3.mdl",
description = [[Vous devez ordonnez aux SWAT, policiers, agents infiltré]],
weapons = {"weapon_physcannon", "speed_gun", "gmod_camera", "weapon_fists", "weapon_physgun", "gmod_tool", "weapon_arc_atmcard", "keys", "itemstore_pickup", "weaponchecker", "door_ram", "stungun", "policebadgewallet", "weapon_r_handcuffs", "m9k_usp"},
command = "chief",
max = 2,
salary = 100,
admin = 0,
vote = true,
hasLicense = true,
chief = true,
NeedToChangeFrom = TEAM_POLICE,
ammo = {
["pistol"] = 60,
},
category = "Civil Protection",
})

TEAM_MAYOR = DarkRP.createJob("Mayor", {
color = Color(150, 20, 20, 255),
model = {
"models/fearless/mayor1.mdl",
"models/fearless/mayor2.mdl"
},
description = [[Le maire instruit les louis de la ville, fait respecter l'ordre dans celle-ci, et dicte les ordres aux forces de l'ordre.]],
weapons = {"weapon_physcannon", "gmod_camera", "weapon_fists", "weapon_physgun", "gmod_tool", "weapon_arc_atmcard", "keys", "itemstore_pickup"},
command = "mayor",
max = 1,
salary = 115,
admin = 0,
vote = true,
hasLicense = true,
mayor = true,
category = "Civil Protection",
})

TEAM_HOBO = DarkRP.createJob("SDF", {
color = Color(80, 45, 0, 255),
model = "models/player/player_simon_henriksson.mdl",
description = [[Vous n'avez plus de foyer, vous vivez dnas la rue en mandiant de l'argent...]],
weapons = {"weapon_physcannon", "gmod_camera", "weapon_fists", "weapon_physgun", "gmod_tool", "weapon_arc_atmcard", "keys", "itemstore_pickup"},
command = "hobo",
max = 0,
salary = 0,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
hobo = true,
category = "Citizens",
})

if not DarkRP.disabledDefaults["modules"]["hungermod"] then
TEAM_COOK = DarkRP.createJob("Cuisinier", {
color = Color(238, 99, 99, 255),
model = {
"models/fearless/chef1.mdl",
"models/fearless/chef2.mdl"
},
description = [[Vous devez vendre de la nourriture de bonne qualité aux gens.]],
weapons = {"weapon_physcannon", "gmod_camera", "weapon_fists", "weapon_physgun", "gmod_tool", "weapon_arc_atmcard", "keys", "itemstore_pickup"},
command = "cook",
max = 2,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
cook = true
})
end

-- 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("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_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,
}
 
Fred-Tension

Fred-Tension

Geek
Messages
51
Score réaction
14
Points
65
Et ça ? addons/darkrpmodification-master/lua/darkrp_config/disabled_defaults.lua
 
Discord d'entraide
Rejoignz-nous sur Discord