Problème de lua

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

_boul12_4

Têtard
Messages
4
Score réaction
0
Points
0
alors j'ai ajouter un job et une catégorie et depuis ça me met des erreurs lua :

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

Corrupt team: Civil!
The admin value must be a number and it must be greater than or equal to zero and smaller than three.

Hints:
- No hints, sorry.

The responsibility for the error above lies with (the authors of) one (or more) of these files:
1. addons/darkrpmodification/lua/darkrp_customthings/jobs.lua on line 18
2. function 'xpcall'
3. gamemodes/darkrp/gamemode/libraries/simplerr.lua on line 477
4. gamemodes/darkrp/gamemode/libraries/fn.lua on line 84
5. gamemodes/darkrp/gamemode/libraries/fn.lua on line 84
6. gamemodes/darkrp/gamemode/libraries/modificationloader.lua on line 138
7. gamemodes/darkrp/gamemode/libraries/modificationloader.lua on line 149
8. gamemodes/darkrp/gamemode/init.lua on line 111
------- End of Simplerr error -------

alors voici mon job.lua et mon catégorie.lua :

--[[-----------------------------------------------------------------------
Categories
---------------------------------------------------------------------------
The categories of the default F4 menu.

Please read this page for more information:

In case that page can't be reached, here's an example with explanation:

DarkRP.createCategory{
name = "Citizens", -- The name of the category.
categorises = "jobs", -- What it categorises. MUST be one of "jobs", "entities", "shipments", "weapons", "vehicles", "ammo".
startExpanded = true, -- Whether the category is expanded when you open the F4 menu.
color = Color(0, 107, 0, 255), -- The color of the category header.
canSee = function(ply) return true end, -- OPTIONAL: whether the player can see this category AND EVERYTHING IN IT.
sortOrder = 100, -- OPTIONAL: With this you can decide where your category is. Low numbers to put it on top, high numbers to put it on the bottom. It's 100 by default.
}


Add new categories under the next line!
---------------------------------------------------------------------------]]
DarkRP.createCategory{
name = "Survivant", -- The name of the category.
categorises = "jobs", -- What it categorises. MUST be one of "jobs", "entities", "shipments", "weapons", "vehicles", "ammo".
startExpanded = true, -- Whether the category is expanded when you open the F4 menu.
color = Color(0, 107, 0, 255), -- The color of the category header.
canSee = function(ply) return true end, -- OPTIONAL: whether the player can see this category AND EVERYTHING IN IT.
sortOrder = 100, -- OPTIONAL: With this you can decide where your category is. Low numbers to put it on top, high numbers to put it on the bottom. It's 100 by default.
}

--[[---------------------------------------------------------------------------
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_CIVIL = DarkRP.createJob("Civil", {
color = Color(115, 117, 122, 255),
model = {
"models/tnb/citizens/female_17.mdl",

},
description = [[Vous êtes un survivant qui ne dépend d'aucune faction, vous vivez dans le Metro et essayez de survivre malgré le peu de moyen que vous possèdez.]],
weapons = {"weapon_fists","keys","weapon_physcannon","gmod_tool"},
command = "survivant",
max = 80,
salary = 10,
vote = false,
hasLicense = false,
category = "Survivant",
candemote = false,
PlayerLoadout = function(ply) ply:SetArmor( 0 ) end,
customCheck = function(ply) return CLIENT or
table.HasValue({"user","admin","superadmin"}, ply:GetNWString("usergroup"))
end,
})


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

un peu d'aide serait la bienvenue, merci d'avance !
 
A!ex

A!ex

Geek suprême
Messages
521
Score réaction
87
Points
140
Salut,
envoie la ligne 18 de ton jobs.lua
 
  • Initiateur de la discussion
_boul12_4

_boul12_4

Têtard
Messages
4
Score réaction
0
Points
0
TEAM_CIVIL = DarkRP.createJob("Civil", {

celle la
 
xLomble77

xLomble77

Psychopathe
Messages
2 191
Score réaction
348
Points
290
Le mieux est d'envoyer tout ton jobs.lua.
 
  • Administration
Numerix

Numerix

Admin
Membre du Staff
Messages
1 913
Score réaction
356
Points
315
C'est écrit hein il fait juste ajouter admin = 0, dans le job (me 0 peux être changer en 1, 2, 3)
 
  • Initiateur de la discussion
_boul12_4

_boul12_4

Têtard
Messages
4
Score réaction
0
Points
0
voici mon job.lua pour ceux qui le demande : [Lua] --[[--------------------------------------------------------------------------- - Pastebin.com

sinon, où ajouter le admin = 0 ?
 
  • Administration
Numerix

Numerix

Admin
Membre du Staff
Messages
1 913
Score réaction
356
Points
315
n'importe ou dans ton jobs civil
 
enzo150105

enzo150105

Guide Suprême
Messages
72
Score réaction
22
Points
115
TEAM_CIVIL = DarkRP.createJob("Civil", { color = Color(115, 117, 122, 255 ), model = {"models/tnb/citizens/female_17.mdl"}, description = [[Vous êtes un survivant qui ne dépend d'aucune faction, vous vivez dans le Metro et essayez de survivre malgré le peu de moyen que vous possèdez.]], weapons = {}, command = "survivant", max = 80, salary = 9, admin = 0, vote = false, hasLicense = false, candemote = false })
Voili Voilou
 
  • Initiateur de la discussion
_boul12_4

_boul12_4

Têtard
Messages
4
Score réaction
0
Points
0
mercii
 
Discord d'entraide
Rejoignz-nous sur Discord