• Lua error - jobs
    7 replies, posted
I made some jobs and I get a lua error, I follow the instructions in the error but I keep going in a loop, can someone help tell me what is causing this please? thank you. Error: [ERROR] Lua is unable to understand file "darkrp_customthings/jobs.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 34, but this bracket is never closed or not closed in time. It was expected to be closed before the 'description' 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 ------- Job code that is on line 34 - 37 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", }] The full job file --[[--------------------------------------------------------------------------- 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: https://github.com/FPtje/DarkRP/blob/master/gamemode/config/jobrelated.lua For examples and explanation please visit this wiki page: http://wiki.darkrp.com/index.php/DarkRP:CustomJobFields Add your custom jobs under the following line: ---------------------------------------------------------------------------]] 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_STAFF = DarkRP.createJob("Administration", {     color = Color(255, 0, 0, 255),     model = {"models/Combine_Super_Soldier.mdl"},     description = [[Job for Staff, You do NOT roleplay as a staff member! MUST FOLLOW ALL RULES IN !motd staff has final say in sits!]],     weapons = {"stunstick", "unarrest_stick","itemstore_pickup"},     command = "staff",     max = 5,     salary = 200,     admin = 0,     vote = false,     hasLicense = false,     candemote = true,     category = "Staff" }] TEAM_PROB1 = DarkRP.createJob("Police Probationary Officer I", {     color = Color(5, 0, 255, 255),     model = {"models/kerry/player/police_usa/male_01.mdl"},     description = [[Follow all rules in the !motd]],     weapons = {"realrbn_tazer_mr", "m9k_glock", "bb_m4a1", "itemstore_pickup"},     command = "prob1",     max = 0,     salary = 250,     admin = 0,     vote = false,     hasLicense = true,     candemote = true, sortorder = 2     category = "Police",     PlayerSpawn = function(ply) ply:SetArmor(150)     end }) TEAM_PROB2 = DarkRP.createJob("Police Probationary Officer II", {     color = Color(5, 0, 255, 255),     model = {         "models/kerry/player/police_usa/male_01.mdl",         "models/kerry/player/police_usa/male_02.mdl",         "models/kerry/player/police_usa/male_03.mdl",         "models/kerry/player/police_usa/male_04.mdl",         "models/kerry/player/police_usa/male_05.mdl",         "models/kerry/player/police_usa/male_06.mdl",         "models/kerry/player/police_usa/male_07.mdl",         "models/kerry/player/police_usa/male_08.mdl",         "models/kerry/player/police_usa/male_09.mdl"},     description = [[Follow all rules in the !motd]],     weapons = {"realrbn_tazer_mr", "m9k_glock", "bb_m4a1", "itemstore_pickup"},     command = "prob2",     max = 0,     salary = 250,     admin = 0,     vote = false,     hasLicense = true,     candemote = true, sortorder = 2     category = "Police",     PlayerSpawn = function(ply)         ply:SetArmor(150)     end }) TEAM_CORP = DarkRP.createJob("Police Corporal", {     color = Color(5, 0, 255, 255),     model = {         "models/kerry/player/police_usa/male_01.mdl",         "models/kerry/player/police_usa/male_02.mdl",         "models/kerry/player/police_usa/male_03.mdl",         "models/kerry/player/police_usa/male_04.mdl",         "models/kerry/player/police_usa/male_05.mdl",         "models/kerry/player/police_usa/male_06.mdl",         "models/kerry/player/police_usa/male_07.mdl",         "models/kerry/player/police_usa/male_08.mdl",         "models/kerry/player/police_usa/male_09.mdl"},     description = [[Follow all rules in the !motd]],     weapons = {"realrbn_tazer_mr", "m9k_glock", "bb_m4a1", "bb_famas", "bb_p90", "itemstore_pickup"},     command = "pc",     max = 0,     salary = 250,     admin = 0,     vote = false,     hasLicense = true,     candemote = true, sortorder = 3     category = "Police",     PlayerSpawn = function(ply)         ply:SetArmor(150)     end }) TEAM_SERG = DarkRP.createJob("Police Sergeant", {     color = Color(5, 0, 255, 255),     model = {         "models/kerry/player/police_usa/male_01.mdl",         "models/kerry/player/police_usa/male_02.mdl",         "models/kerry/player/police_usa/male_03.mdl",         "models/kerry/player/police_usa/male_04.mdl",         "models/kerry/player/police_usa/male_05.mdl",         "models/kerry/player/police_usa/male_06.mdl",         "models/kerry/player/police_usa/male_07.mdl",         "models/kerry/player/police_usa/male_08.mdl",         "models/kerry/player/police_usa/male_09.mdl"},     description = [[Follow all rules in the !motd]],     weapons = {"realrbn_tazer_mr", "m9k_glock", "bb_m4a1", "bb_famas", "bb_p90", "itemstore_pickup"},     command = "ps",     max = 0,     salary = 250,     admin = 0,     vote = false,     hasLicense = true,     candemote = true, sortorder = 4     category = "Police",     PlayerSpawn = function(ply)         ply:SetArmor(150)     end }) TEAM_SSRG = DarkRP.createJob("Police Staff Sergeant", {     color = Color(5, 0, 255, 255),     model = {         "models/kerry/player/police_usa/male_01.mdl",         "models/kerry/player/police_usa/male_02.mdl",         "models/kerry/player/police_usa/male_03.mdl",         "models/kerry/player/police_usa/male_04.mdl",         "models/kerry/player/police_usa/male_05.mdl",         "models/kerry/player/police_usa/male_06.mdl",         "models/kerry/player/police_usa/male_07.mdl",         "models/kerry/player/police_usa/male_08.mdl",         "models/kerry/player/police_usa/male_09.mdl"},     description = [[Follow all rules in the !motd]],     weapons = {"realrbn_tazer_mr", "m9k_glock", "bb_m4a1", "bb_famas", "bb_p90", "itemstore_pickup"},     command = "ssg",     max = 0,     salary = 250,     admin = 0,     vote = false,     hasLicense = true,     candemote = true, sortorder = 5     category = "Police",     PlayerSpawn = function(ply)         ply:SetArmor(150)     end }) TEAM_MSGT = DarkRP.createJob("Police Master Sergeant", {     color = Color(5, 0, 255, 255),     model = {         "models/kerry/player/police_usa/male_01.mdl",         "models/kerry/player/police_usa/male_02.mdl",         "models/kerry/player/police_usa/male_03.mdl",         "models/kerry/player/police_usa/male_04.mdl",         "models/kerry/player/police_usa/male_05.mdl",         "models/kerry/player/police_usa/male_06.mdl",         "models/kerry/player/police_usa/male_07.mdl",         "models/kerry/player/police_usa/male_08.mdl",         "models/kerry/player/police_usa/male_09.mdl"},     description = [[Follow all rules in the !motd]],     weapons = {"realrbn_tazer_mr", "m9k_glock", "bb_m4a1", "bb_famas", "bb_p90", "itemstore_pickup"},     command = "msgt",     max = 0,     salary = 250,     admin = 0,     vote = false,     hasLicense = true,     candemote = true, sortorder = 6     category = "Police",     PlayerSpawn = function(ply)         ply:SetArmor(150)     end }) TEAM_SM = DarkRP.createJob("Police Sergeant Major", {     color = Color(5, 0, 255, 255),     model = {         "models/kerry/player/police_usa/male_01.mdl",         "models/kerry/player/police_usa/male_02.mdl",         "models/kerry/player/police_usa/male_03.mdl",         "models/kerry/player/police_usa/male_04.mdl",         "models/kerry/player/police_usa/male_05.mdl",         "models/kerry/player/police_usa/male_06.mdl",         "models/kerry/player/police_usa/male_07.mdl",         "models/kerry/player/police_usa/male_08.mdl",         "models/kerry/player/police_usa/male_09.mdl"},     description = [[Follow all rules in the !motd]],     weapons = {"realrbn_tazer_mr", "m9k_glock", "bb_m4a1", "bb_famas", "bb_p90", "itemstore_pickup"},     command = "sm",     max = 0,     salary = 250,     admin = 0,     vote = false,     hasLicense = true,     candemote = true, sortorder = 7     category = "Police",     PlayerSpawn = function(ply)         ply:SetArmor(150)     end }) TEAM_LIEUT = DarkRP.createJob("Police I Lieutenant", {     color = Color(5, 0, 255, 255),     model = {         "models/kerry/player/police_usa/male_01.mdl",         "models/kerry/player/police_usa/male_02.mdl",         "models/kerry/player/police_usa/male_03.mdl",         "models/kerry/player/police_usa/male_04.mdl",         "models/kerry/player/police_usa/male_05.mdl",         "models/kerry/player/police_usa/male_06.mdl",         "models/kerry/player/police_usa/male_07.mdl",         "models/kerry/player/police_usa/male_08.mdl",         "models/kerry/player/police_usa/male_09.mdl"},     description = [[Follow all rules in the !motd]],     weapons = {"realrbn_tazer_mr", "m9k_glock", "bb_m4a1", "bb_famas", "bb_p90", "itemstore_pickup", "m9k_val"},     command = "lieuten",     max = 0,     salary = 250,     admin = 0,     vote = false,     hasLicense = true,     candemote = true, sortorder 8     category = "Police",     PlayerSpawn = function(ply)         ply:SetArmor(150)     end }) TEAM_LIEU2 = DarkRP.createJob("Police II Lieutenant", {     color = Color(5, 0, 255, 255),     model = {         "models/kerry/player/police_usa/male_01.mdl",         "models/kerry/player/police_usa/male_02.mdl",         "models/kerry/player/police_usa/male_03.mdl",         "models/kerry/player/police_usa/male_04.mdl",         "models/kerry/player/police_usa/male_05.mdl",         "models/kerry/player/police_usa/male_06.mdl",         "models/kerry/player/police_usa/male_07.mdl",         "models/kerry/player/police_usa/male_08.mdl",         "models/kerry/player/police_usa/male_09.mdl"},     description = [[Follow all rules in the !motd]],     weapons = {"realrbn_tazer_mr", "m9k_glock", "bb_m4a1", "bb_famas", "bb_p90", "itemstore_pickup", "m9k_val"},     command = "lieuten2",     max = 0,     salary = 250,     admin = 0,     vote = false,     hasLicense = true,     candemote = true, sortorder = 9     category = "Police",     PlayerSpawn = function(ply)         ply:SetArmor(150)     end }) TEAM_CAPT = DarkRP.createJob("Police Captain", {     color = Color(5, 0, 255, 255),     model = {         "models/kerry/player/police_usa/male_01.mdl",         "models/kerry/player/police_usa/male_02.mdl",         "models/kerry/player/police_usa/male_03.mdl",         "models/kerry/player/police_usa/male_04.mdl",         "models/kerry/player/police_usa/male_05.mdl",         "models/kerry/player/police_usa/male_06.mdl",         "models/kerry/player/police_usa/male_07.mdl",         "models/kerry/player/police_usa/male_08.mdl",         "models/kerry/player/police_usa/male_09.mdl"},     description = [[Follow all rules in the !motd]],     weapons = {"realrbn_tazer_mr", "m9k_glock", "bb_m4a1", "itemstore_pickup", "m9k_val", "m9k_m4a1"},     command = "cap",     max = 0,     salary = 250,     admin = 0,     vote = false,     hasLicense = true,     candemote = true,     category = "Police", sortorder = 10     PlayerSpawn = function(ply)         ply:SetArmor(150)     end }) TEAM_DEPC = DarkRP.createJob("Police Deputy Chief", {     color = Color(5, 0, 255, 255),     model = {         "models/kerry/player/police_usa/male_01.mdl",         "models/kerry/player/police_usa/male_02.mdl",         "models/kerry/player/police_usa/male_03.mdl",         "models/kerry/player/police_usa/male_04.mdl",         "models/kerry/player/police_usa/male_05.mdl",         "models/kerry/player/police_usa/male_06.mdl",         "models/kerry/player/police_usa/male_07.mdl",         "models/kerry/player/police_usa/male_08.mdl",         "models/kerry/player/police_usa/male_09.mdl"},     description = [[Follow all rules in the !motd You can use the intercom to  talk to everyone on the server! DO NOT ABUSE IT OR I WILL REMOVE IT!]],     weapons = {"realrbn_tazer_mr", "m9k_glock", "bb_m4a1", "itemstore_pickup", "m9k_val", "m9k_m4a1"},     command = "depc",     max = 0,     salary = 250,     admin = 0,     vote = false,     hasLicense = true,     candemote = true, sortorder = 11     category = "Police",     PlayerSpawn = function(ply)         ply:SetArmor(150)     end }) TEAM_CHIEF = DarkRP.createJob("Police Chief", {     color = Color(5, 0, 255, 255),     model = {         "models/kerry/player/police_usa/male_01.mdl",         "models/kerry/player/police_usa/male_02.mdl",         "models/kerry/player/police_usa/male_03.mdl",         "models/kerry/player/police_usa/male_04.mdl",         "models/kerry/player/police_usa/male_05.mdl",         "models/kerry/player/police_usa/male_06.mdl",         "models/kerry/player/police_usa/male_07.mdl",         "models/kerry/player/police_usa/male_08.mdl",         "models/kerry/player/police_usa/male_09.mdl"},     description = [[Follow all rules in the !motd You can use the intercom to  talk to everyone on the server! DO NOT ABUSE IT OR I WILL REMOVE IT!]],     weapons = {"realrbn_tazer_mr", "bb_m4a1", "itemstore_pickup", "m9k_val", "bb_awp", "bb_xm1014_alt", "m9k_hk45"},     command = "ch",     max = 0,     salary = 250,     admin = 0,     vote = false,     hasLicense = true,     candemote = true, sortorder = 12     category = "Police",     PlayerSpawn = function(ply)         ply:SetArmor(150)     end }) --[[--------------------------------------------------------------------------- Define which team joining players spawn into and what team you change to if demoted ---------------------------------------------------------------------------]] GAMEMODE.DefaultTeam = TEAM_CITIZEN --[[--------------------------------------------------------------------------- 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, [TEAM_CHIEF] = true, [TEAM_DEPC] = true, [TEAM_CAPT] = true, [TEAM_LIEU2] = true, [TEAM_LIEUTtt] = true, [TEAM_SM] = true, [TEAM_MSGT] = true, [TEAM_SSRG] = true, [TEAM_SERG] = true, [TEAM_CORP] = true, [TEAM_PROB2] = true, [TEAM_STAFF] = true, } --[[--------------------------------------------------------------------------- Jobs that are hitmen (enables the hitman menu) ---------------------------------------------------------------------------]] DarkRP.addHitmanTeam(TEAM_MOB)
It's a simple fix if you could just read.. at the end of each job stop adding ] and replace it with )
ok i did that now i get this error, RROR] Lua is unable to understand file "darkrp_customthings/jobs.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 63, but this bracket is never closed or not closed in time. It was expected to be closed before the 'category' 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 ------- and i do use that site
You forgot a comma at the end of the line sortorder = 2
ok that fxed some of it but now i get another error [ERROR] Lua is unable to understand file "darkrp_customthings/entities.lua" because its author made a mistake around line number 47. The best help I can give you is this: There is an opening '(' bracket at line 39, but this bracket is never closed or not closed in time. It was expected to be closed before the '}' at line 47. 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 ------- the error is about TEAM_PROB1 and line 39 is the description and line 47 is where it says candemote = true,
"darkrp_customthings/entities.lua" I thought we were in jobs.lua... Looks like an error from a different file.
oh lol i was so used to the errors being in jobs.lua i would skip over that part
Sorry, you need to Log In to post a reply to this thread.