Bug job.lua

  • Initiateur de la discussion
brimox

brimox

Geek
Messages
6
Score réaction
0
Points
80
Bonjour j'ai un problème quand je rejoint mon serv sa me dit

[ERROR] Lua is unable to understand file "darkrp_customthings/jobs.lua" because its author made a mistake around line number 21.
The best help I can give you is this:

Right before the 'TEAM_CIT', Lua expected to read an '='-sign, but it didn't.

Hints:
- Did you simply forget the '='-sign?
- Did you forget a comma?
- Is this supposed to be a local variable?

------- End of Simplerr error -------

-----------------------------------------------------
--[[---------------------------------------------------------------------------
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 jobs under the following line:
---------------------------------------------------------------------------]]
ligne21-TEAM_CIT = DarkRP.createJob("Citoyen", {
color = Color(0, 0, 0, 255),
model = {
"models/humans/group02/player/tale_01.mdl",
"models/humans/group02/player/tale_03.mdl",
"models/humans/group02/player/tale_04.mdl",
"models/humans/group02/player/tale_05.mdl",
"models/humans/group02/player/tale_06.mdl",
"models/humans/group02/player/tale_07.mdl",
"models/humans/group02/player/tale_09.mdl",
"models/humans/group02/player/temale_01.mdl",
"models/humans/group02/player/temale_02.mdl",
"models/humans/group02/player/temale_07.mdl"
},
description = [[Vous êtes un citoyen]],
weapons = {"weapon_physcannon", "weapon_adv_keys", "surrender", "idcard", "weapon_fists", "gmod_camera", "gmod_tool", "weapon_physgun", "itemstore_pickup"},
command = "citoyen",
max = 0,
salary = 50,
admin = ,
vote = ,
hasLicense = ,
candemote = ,
category = "Civil",
NeedToChangeFrom = TEAM_CITOYEN
})

TEAM_SDF = DarkRP.createJob("SDF", {
color = Color(100, 168, 127, 255),
model = {"models/player/corpse1.mdl"},
description = [[]],
weapons = {"surrender", "weapon_bugbait"},
command = "sdf",
max = 4,
salary = 0,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
-- CustomCheck
medic = false,
chief = false,
mayor = false,
hobo = false,
cook = false,
category = "Civil",
})

vous pouvez m'aider svp
 
Jackyyyyyyyyyyy

Jackyyyyyyyyyyy

Jackyyyyyyyyyyy
Messages
434
Score réaction
32
Points
140
Est ce que tu peux envoyer un pastbin du fichier entier avec toutes les lignes stp
 
Jo Ballas

Jo Ballas

Geek suprême
Messages
561
Score réaction
103
Points
150
Alors pour ceux qui ne le savent pas il est déconseiller de changer certaine team par défaut même ci je ne pense pas que ce cela qui soit la cause de votre erreur.
Les team a ne surtout pas changer sauf si vous vous y connaissez sont TEAM_CITIZEN, TEAM_COOK, TEAM_MAYOR (se sont la des team par défaut certaine permission sont automatiquement configuré pour fonctionner avec ses team donc si vous les modifiez sans connaissance glua cela risque de causer des dysfonctionnement)

Je vous envois les 3 team par défaut que j'ai cité plus haut

TEAM_CITIZEN = DarkRP.createJob("Citizen", {
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 = {},
command = "citizen",
max = 0,
salary = GAMEMODE.Config.normalsalary,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
category = "Citizens",
})

TEAM_MAYOR = DarkRP.createJob("Mayor", {
color = Color(150, 20, 20, 255),
model = "models/player/breen.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.
/unlockdown to end a lockdown]],
weapons = {},
command = "mayor",
max = 1,
salary = GAMEMODE.Config.normalsalary * 1.89,
admin = 0,
vote = true,
hasLicense = false,
mayor = true,
category = "Civil Protection",
})

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

Libre a vous de changer le nom ou de modifier le reste mais ne modifiez surtout pas les team !

NB : TEAM_CHIEF & TEAM_POLICE sont aussi des team par défaut qui utilisent certaine fonction si vous les modifiez vous devrez leurs accordez certaine permission pour qu'elle fonctionne correctement et si vous rajoutez de nouvelle team police ou gouvernement ect... vous devrez fonctionnez sur le même principe que les team police par défaut et donc leurs accorder + ou moins les même permissions selon ce que vous cherchez a faire.
 
Discord d'entraide
Rejoignz-nous sur Discord