J'ai un probleme avec la meth

  • Initiateur de la discussion
R

Rayan93

Geek
Messages
12
Score réaction
4
Points
45
quand je mes la meth dans l entité.lua tous et coder regarder


DarkRP.createEntity("Gas Canister", {
ent = "eml_gas",
model = "models/props_c17/canister01a.mdl",
price = 500,
max = 4,
cmd = "buygascanister"
allowed = {TEAM_SCIENTIFIQUE},
})

DarkRP.createEntity("Liquid Iodine", {
ent = "eml_iodine",
model = "models/props_lab/jar01b.mdl",
price = 30,
max = 20,
cmd = "buyiodine"
allowed = {TEAM_SCIENTIFIQUE},
})

DarkRP.createEntity("Jar", {
ent = "eml_jar",
model = "models/props_lab/jar01a.mdl",
price = 30,
max = 20,
cmd = "buyjar"
allowed = {TEAM_SCIENTIFIQUE},
})

DarkRP.createEntity("Muriatic Acid", {
ent = "eml_macid",
model = "models/props_junk/garbage_plasticbottle001a.mdl",
price = 50,
max = 20,
cmd = "buymacid"
allowed = {TEAM_SCIENTIFIQUE},
})

DarkRP.createEntity("Pot", {
ent = "eml_pot",
model = "models/props_c17/metalPot001a.mdl",
price = 250,
max = 20,
cmd = "buypot"
allowed = {TEAM_SCIENTIFIQUE},
})

DarkRP.createEntity("Special Pot", {
ent = "eml_spot",
model = "models/props_c17/metalPot001a.mdl",
price = 250,
max = 20,
cmd = "buyspot"
allowed = {TEAM_SCIENTIFIQUE},
})

DarkRP.createEntity("Stove", {
ent = "eml_stove",
model = "models/props_c17/furnitureStove001a.mdl",
price = 100,
max = 5,
cmd = "buystove"
allowed = {TEAM_SCIENTIFIQUE},
})

DarkRP.createEntity("Liquid Sulfur", {
ent = "eml_sulfur",
model = "models/props_lab/jar01b.mdl",
price = 40,
max = 20,
cmd = "buysulfur"
allowed = {TEAM_SCIENTIFIQUE},
})

DarkRP.createEntity("Water", {
ent = "eml_water",
model = "models/props_junk/garbage_plasticbottle003a.mdl",
price = 30,
max = 20,
cmd = "buywater"
allowed = {TEAM_SCIENTIFIQUE},
})

Mais quand je reboot pour que sa se généré dans mon serveur sa me mais

There is 1 Lua problem!
Please check your console for more information!
[ERROR] Lua is unable to understand file "darkrp_customthings/entities.lua" because its author made a mistake around line number 25.
The best help I can give you is this:

There is an opening '{' bracket at line 19, but this bracket is never closed or not closed in time. It was expected to be closed before the 'allowed' at line 25.

Hints:
- Did you forget a comma?
- All open brackets ({, (, [) must have a matching closing bracket. Are you sure it's there?
- Brackets must be opened and closed in the right order. This will work: ({}), but this won't: ({)}.

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

et quand je regle sa sa mes mes une erreur cmd

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

Corrupt entity: Iode Liquide!
This entity does not have a unique command.

Hints:
- There must be some other entity that has the same thing for 'cmd'.
- Fix this by changing the 'cmd' field of your entity to something else.

Aider moi svp
 
rlevet

rlevet

Geek suprême
Messages
119
Score réaction
4
Points
135
En gros, il y a une erreur avec les { }
Je cherche actuellement l'erreur.
PS : J'ai l'addon, je peux donc t'aider
 
rlevet

rlevet

Geek suprême
Messages
119
Score réaction
4
Points
135
Je pense que j'ai trouvé ton erreur :

Ton code :

DarkRP.createEntity("Gas Canister", {
ent = "eml_gas",
model = "models/props_c17/canister01a.mdl",
price = 500,
max = 4,
cmd = "buygascanister"
allowed = {TEAM_SCIENTIFIQUE},
})

Le code montré :

DarkRP.createEntity("Gas Canister", {
ent = "eml_gas",
model = "models/props_c17/canister01a.mdl",
price = 0,
max = 20,
cmd = "buygascanister"
})

L'erreur (elle ne se voit pas très bien) est l'espace avant le code :
Par exemple cela devrait faire un truc comme ça :

DarkRP.createEntity("Gas Canister", {
ent = "eml_gas",
model = "models/props_c17/canister01a.mdl",
price = 500,
max = 4,
cmd = "buygascanister"
allowed = {TEAM_SCIENTIFIQUE},
})

Ceci est une hypothèse.
 
rlevet

rlevet

Geek suprême
Messages
119
Score réaction
4
Points
135
Je viens de trouver une nouvelle erreur :
Ton code est mal formé : les virgules sont mal placées
Après cmd = "buygascanister" tu n'as pas mis de virgule !!!
Il faut mettre des virgules partout sauf au dernier code (pas totalement mais en gros c'est ça).
Et a allowed = {TEAM_SCIENTIFIQUE}, tu en a mis une.

Je pense que le code corrigé serais :

DarkRP.createEntity("Gas Canister", {
ent = "eml_gas",
model = "models/props_c17/canister01a.mdl",
price = 500,
max = 4,
cmd = "buygascanister",
allowed = {TEAM_SCIENTIFIQUE}
})

DarkRP.createEntity("Liquid Iodine", {
ent = "eml_iodine",
model = "models/props_lab/jar01b.mdl",
price = 30,
max = 20,
cmd = "buyiodine",
allowed = {TEAM_SCIENTIFIQUE}
})

DarkRP.createEntity("Jar", {
ent = "eml_jar",
model = "models/props_lab/jar01a.mdl",
price = 30,
max = 20,
cmd = "buyjar",
allowed = {TEAM_SCIENTIFIQUE}
})

DarkRP.createEntity("Muriatic Acid", {
ent = "eml_macid",
model = "models/props_junk/garbage_plasticbottle001a.mdl",
price = 50,
max = 20,
cmd = "buymacid",
allowed = {TEAM_SCIENTIFIQUE}
})

DarkRP.createEntity("Pot", {
ent = "eml_pot",
model = "models/props_c17/metalPot001a.mdl",
price = 250,
max = 20,
cmd = "buypot",
allowed = {TEAM_SCIENTIFIQUE}
})

DarkRP.createEntity("Special Pot", {
ent = "eml_spot",
model = "models/props_c17/metalPot001a.mdl",
price = 250,
max = 20,
cmd = "buyspot",
allowed = {TEAM_SCIENTIFIQUE}
})

DarkRP.createEntity("Stove", {
ent = "eml_stove",
model = "models/props_c17/furnitureStove001a.mdl",
price = 100,
max = 5,
cmd = "buystove",
allowed = {TEAM_SCIENTIFIQUE}
})

DarkRP.createEntity("Liquid Sulfur", {
ent = "eml_sulfur",
model = "models/props_lab/jar01b.mdl",
price = 40,
max = 20,
cmd = "buysulfur",
allowed = {TEAM_SCIENTIFIQUE}
})

DarkRP.createEntity("Water", {
ent = "eml_water",
model = "models/props_junk/garbage_plasticbottle003a.mdl",
price = 30,
max = 20,
cmd = "buywater",
allowed = {TEAM_SCIENTIFIQUE}
})

Dites moi si j'ai fais une erreur !
PS : Je suis nouveau, merci de me dire si je ne respecte pas des règles :)
 
  • Initiateur de la discussion
R

Rayan93

Geek
Messages
12
Score réaction
4
Points
45
rlevet à dit:
Je viens de trouver une nouvelle erreur :
Ton code est mal formé : les virgules sont mal placées
Après cmd = "buygascanister" tu n'as pas mis de virgule !!!
Il faut mettre des virgules partout sauf au dernier code (pas totalement mais en gros c'est ça).
Et a allowed = {TEAM_SCIENTIFIQUE}, tu en a mis une.

Je pense que le code corrigé serais :

DarkRP.createEntity("Gas Canister", {
ent = "eml_gas",
model = "models/props_c17/canister01a.mdl",
price = 500,
max = 4,
cmd = "buygascanister",
allowed = {TEAM_SCIENTIFIQUE}
})

DarkRP.createEntity("Liquid Iodine", {
ent = "eml_iodine",
model = "models/props_lab/jar01b.mdl",
price = 30,
max = 20,
cmd = "buyiodine",
allowed = {TEAM_SCIENTIFIQUE}
})

DarkRP.createEntity("Jar", {
ent = "eml_jar",
model = "models/props_lab/jar01a.mdl",
price = 30,
max = 20,
cmd = "buyjar",
allowed = {TEAM_SCIENTIFIQUE}
})

DarkRP.createEntity("Muriatic Acid", {
ent = "eml_macid",
model = "models/props_junk/garbage_plasticbottle001a.mdl",
price = 50,
max = 20,
cmd = "buymacid",
allowed = {TEAM_SCIENTIFIQUE}
})

DarkRP.createEntity("Pot", {
ent = "eml_pot",
model = "models/props_c17/metalPot001a.mdl",
price = 250,
max = 20,
cmd = "buypot",
allowed = {TEAM_SCIENTIFIQUE}
})

DarkRP.createEntity("Special Pot", {
ent = "eml_spot",
model = "models/props_c17/metalPot001a.mdl",
price = 250,
max = 20,
cmd = "buyspot",
allowed = {TEAM_SCIENTIFIQUE}
})

DarkRP.createEntity("Stove", {
ent = "eml_stove",
model = "models/props_c17/furnitureStove001a.mdl",
price = 100,
max = 5,
cmd = "buystove",
allowed = {TEAM_SCIENTIFIQUE}
})

DarkRP.createEntity("Liquid Sulfur", {
ent = "eml_sulfur",
model = "models/props_lab/jar01b.mdl",
price = 40,
max = 20,
cmd = "buysulfur",
allowed = {TEAM_SCIENTIFIQUE}
})

DarkRP.createEntity("Water", {
ent = "eml_water",
model = "models/props_junk/garbage_plasticbottle003a.mdl",
price = 30,
max = 20,
cmd = "buywater",
allowed = {TEAM_SCIENTIFIQUE}
})

Dites moi si j'ai fais une erreur !
PS : Je suis nouveau, merci de me dire si je ne respecte pas des règles :)
ok j essai
 
rlevet

rlevet

Geek suprême
Messages
119
Score réaction
4
Points
135
J'espère que cela va fonctionner ! :)FrankerZDeIlluminati
 
MineProdZ

MineProdZ

Geek suprême
Messages
816
Score réaction
120
Points
160
rlevet à dit:
J'espère que cela va fonctionner ! :)FrankerZDeIlluminati
A mon avis ça a marché mais il a la flemme de revenir dire merci :p
 
  • Initiateur de la discussion
R

Rayan93

Geek
Messages
12
Score réaction
4
Points
45
Merci beaucoup Erreur de conexion :)
 
Discord d'entraide
Rejoignz-nous sur Discord