Je n'arrive pas à Résoudre une Error Lua !

  • Initiateur de la discussion
Max | FantasiaCityRP

Max | FantasiaCityRP

Geek
Messages
43
Score réaction
2
Points
45
Bonsoir,
Je suis en train de coder mon serveur, j'ai mis des npc jobs et quand j'ai reeboot cela m'a fait cette erreur:
Code:
[ERROR] Lua is unable to understand file "darkrp_modules/job_system/sh_init.lua" because its author made a mistake around line number 76.
The best help I can give you is this:
There is an opening '{' bracket at line 32, but this bracket is never closed or not closed in time. It was expected to be closed before the 'function' at line 76.
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 -------
Mais pourtant dans mon fichier sh_init.lua à la ligne 76 cela se termine par une fermeture de parenthèse donc si vous avez la solution n'hésitez pas à me répondre dans les commantaires. Et je vous mais mon fichier sh_init.lua (ligne 76= function Job:Get(name):
Code:
Job = {}

Job.NPC = { // commerce = { name = "Commerce", -- type name model = {"models/player/group01/male_01.mdl"}, -- NPC models pos = { -- NPC positions [1] = { pos = Vector(-5251.149902,-2772.079346,72.031250), angle = Angle(1.748857,-89.995514,0.000000), } }, limit = 0.4 -- percentage limit (40% of players allowed to pick a job which has commerce type) }, gouvernement = { name = "Gouvernement", model = {"models/player/donald_trump.mdl"}, pos = { [1] = { pos = Vector(-4255.541016,-8468.031250,128.031250), angle = Angle(2.287882,90.178917,0.000000), [2] = { pos = Vector(-8761.892578,-5587.994629,72.031250), angle = Angle(2.485881,-89.572258,0.000000), [3] = { pos = Vector(868.580627,3851.946289,600.031250), angle = Angle(0.912896,88.762428,0.000000), [4] = { pos = Vector(-194.968750,8474.364258,675.031250), angle = Angle(2.133893,-178.603790,0.000000), } }, limit = 0.3 }, crime = { name = "Criminels", model = {"models/shaklin/payday2/pd2_dallas.mdl"}, pos = { [1] = { pos = Vector(-4479.121582,-2772.013428,72.031250), angle = Angle(1.517849,-90.138512,0.000000), } }, limit = 0.5 }, citoyen = { name = "Citoyens", model = {"models/player/group01/male_01.mdl"}, pos = { [1] = { pos = Vector(-3932.031250,-3091.934082,72.031250), angle = Angle(0.340855,-179.975662,0.000000), } }, limit = 0.5 }
}
function Job:Get(name) return Job.NPC[name]
end
 
Dernière édition:
Feytone

Feytone

Chuck Norris
Messages
4 741
Score réaction
1 301
Points
600
Salut, ce job system est beaucoup beuggé, donc si tu souhaites vraiment le garder, ça va être dur ;) J'ai eu que des problèmes quand j'ai voulu l'utiliser
 
  • Initiateur de la discussion
Max | FantasiaCityRP

Max | FantasiaCityRP

Geek
Messages
43
Score réaction
2
Points
45
Feytone à dit:
Salut, ce job system est beaucoup beuggé, donc si tu souhaites vraiment le garder, ça va être dur ;) J'ai eu que des problèmes quand j'ai voulu l'utiliser
Ah... Je vais attendre quelques réponses et sinon je l'enleverai.
 
Feytone

Feytone

Chuck Norris
Messages
4 741
Score réaction
1 301
Points
600
Code:
 [1] = { pos = Vector(-4255.541016,-8468.031250,128.031250), angle = Angle(2.287882,90.178917,0.000000), [2] = { pos = Vector(-8761.892578,-5587.994629,72.031250), angle = Angle(2.485881,-89.572258,0.000000), [3] = { pos = Vector(868.580627,3851.946289,600.031250), angle = Angle(0.912896,88.762428,0.000000), [4] = { pos = Vector(-194.968750,8474.364258,675.031250), angle = Angle(2.133893,-178.603790,0.000000), }
Déjà t'a fait une erreur dans le gouvernement.

Tu ouvres des brackets mais tu ne les refermes pas. Donc à chaque fin de position tu dois les fermer. De cette manière :

Code:
 [1] = { pos = Vector(-4255.541016,-8468.031250,128.031250), angle = Angle(2.287882,90.178917,0.000000) } [2] = { pos = Vector(-8761.892578,-5587.994629,72.031250), angle = Angle(2.485881,-89.572258,0.000000) } [3] = { pos = Vector(868.580627,3851.946289,600.031250), angle = Angle(0.912896,88.762428,0.000000) } [4] = { pos = Vector(-194.968750,8474.364258,675.031250), angle = Angle(2.133893,-178.603790,0.000000) }
 
  • Initiateur de la discussion
Max | FantasiaCityRP

Max | FantasiaCityRP

Geek
Messages
43
Score réaction
2
Points
45
Feytone à dit:
Code:
 [1] = { pos = Vector(-4255.541016,-8468.031250,128.031250), angle = Angle(2.287882,90.178917,0.000000), [2] = { pos = Vector(-8761.892578,-5587.994629,72.031250), angle = Angle(2.485881,-89.572258,0.000000), [3] = { pos = Vector(868.580627,3851.946289,600.031250), angle = Angle(0.912896,88.762428,0.000000), [4] = { pos = Vector(-194.968750,8474.364258,675.031250), angle = Angle(2.133893,-178.603790,0.000000), }
Déjà t'a fait une erreur dans le gouvernement.

Tu ouvres des brackets mais tu ne les refermes pas. Donc à chaque fin de position tu dois les fermer. De cette manière :

Code:
 [1] = { pos = Vector(-4255.541016,-8468.031250,128.031250), angle = Angle(2.287882,90.178917,0.000000) } [2] = { pos = Vector(-8761.892578,-5587.994629,72.031250), angle = Angle(2.485881,-89.572258,0.000000) } [3] = { pos = Vector(868.580627,3851.946289,600.031250), angle = Angle(0.912896,88.762428,0.000000) } [4] = { pos = Vector(-194.968750,8474.364258,675.031250), angle = Angle(2.133893,-178.603790,0.000000) }
Merci je vais corriger et je vais faire un reboot.
 
  • Initiateur de la discussion
Max | FantasiaCityRP

Max | FantasiaCityRP

Geek
Messages
43
Score réaction
2
Points
45
Maintenant cela me mets ça comme erreur:
Code:
[ERROR] Lua is unable to understand file "darkrp_modules/job_system/sh_init.lua" because its author made a mistake around line number 37.
The best help I can give you is this:
There is an opening '{' bracket at line 32, but this bracket is never closed or not closed in time. It was expected to be closed before the '[' at line 37.
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 voici mon fichier sh_init.lua:
Code:
Job = {}

Job.NPC = { // commerce = { name = "Commerce", -- type name model = {"models/player/group01/male_01.mdl"}, -- NPC models pos = { -- NPC positions [1] = { pos = Vector(-5251.149902,-2772.079346,72.031250), angle = Angle(1.748857,-89.995514,0.000000) } }, limit = 0.4 -- percentage limit (40% of players allowed to pick a job which has commerce type) }, gouvernement = { name = "Gouvernement", model = {"models/player/donald_trump.mdl"}, pos = { [1] = { pos = Vector(-4255.541016,-8468.031250,128.031250), angle = Angle(2.287882,90.178917,0.000000) }
l.37 [2] = { pos = Vector(-8761.892578,-5587.994629,72.031250), angle = Angle(2.485881,-89.572258,0.000000) } [3] = { pos = Vector(868.580627,3851.946289,600.031250), angle = Angle(0.912896,88.762428,0.000000) } [4] = { pos = Vector(-194.968750,8474.364258,675.031250), angle = Angle(2.133893,-178.603790,0.000000) } }, limit = 0.3 }, crime = { name = "Criminels", model = {"models/shaklin/payday2/pd2_dallas.mdl"}, pos = { [1] = { pos = Vector(-4479.121582,-2772.013428,72.031250), angle = Angle(1.517849,-90.138512,0.000000) } }, limit = 0.5 }, citoyen = { name = "Citoyens", model = {"models/player/group01/male_01.mdl"}, pos = { [1] = { pos = Vector(-3932.031250,-3091.934082,72.031250), angle = Angle(0.340855,-179.975662,0.000000) } }, limit = 0.5 }
}
function Job:Get(name) return Job.NPC[name]
end
 
Dernière édition:
  • Initiateur de la discussion
Max | FantasiaCityRP

Max | FantasiaCityRP

Geek
Messages
43
Score réaction
2
Points
45
J'ai réussi à résoudre se problème ne supprimant le dossier job_system ainsi que ses NPCs, impossible de corriger l'erreur donc je pense que cet addon est beugé.
 
Discord d'entraide
Rejoignz-nous sur Discord