• DarkRP job code lua error, have no idea where to place comma, if at all.
    2 replies, posted
Error Message: [ERROR] Lua is unable to understand file "darkrp_customthings/jobs.lua" because its author made a mistake around line number 216. The best help I can give you is this: There is an opening '{' bracket at line 196, but this bracket is never closed or not closed in time. It was expected to be closed before the 'PlayerDeath' at line 216. 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: ({)}. Job code causing the problem: TEAM_RAT = DarkRP.createJob("Sewer Rat", {     color = Color(4, 97, 8, 255),     model = {"models/jerry/mutants/stalker_anomaly_rat.mdl"},     description = [[You have spent your life inside the sewer living in the darkness, you eat whatever you come by, even if that may be other people. You have never been in the broad daylight and it scares you.]],     weapons = {"swep_am_monster"},     command = "rat",     max = 3,     salary = 0,     admin = 0,     vote = false,     hasLicense = false,     candemote = true,     category = "Other", PlayerSpawn = function(ply) if( ply:Team() == TEAM_RAT ) then ply:SetRunSpeed(450) ply:SetWalkSpeed(250) ply:SetViewOffset(Vector(0,0,40)) end end PlayerDeath = function( ply ) if( ply:Team() == TEAM_RAT ) then ply:SetRunSpeed(450) ply:SetWalkSpeed(250) ply:SetViewOffset(Vector(0,0,0)) end end }) Please help, not sure what to do to fix
Put a comma after the end statement for PlayerSpawn TEAM_RAT = DarkRP.createJob("Sewer Rat", { color = Color(4, 97, 8, 255), model = {"models/jerry/mutants/stalker_anomaly_rat.mdl"}, description = [[You have spent your life inside the sewer living in the darkness, you eat whatever you come by, even if that may be other people. You have never been in the broad daylight and it scares you.]], weapons = {"swep_am_monster"}, command = "rat", max = 3, salary = 0, admin = 0, vote = false, hasLicense = false, candemote = true, category = "Other", PlayerSpawn = function(ply) if( ply:Team() == TEAM_RAT ) then ply:SetRunSpeed(450) ply:SetWalkSpeed(250) ply:SetViewOffset(Vector(0,0,40)) end end, PlayerDeath = function( ply ) if( ply:Team() == TEAM_RAT ) then ply:SetRunSpeed(450) ply:SetWalkSpeed(250) ply:SetViewOffset(Vector(0,0,0)) end end })
Thank you, a tad new to this and all my knowledge is from close instruction of another person
Sorry, you need to Log In to post a reply to this thread.