1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Sign up for news, events and more!

    You're currently visiting the official DarkRP Forums as a guest. Sign up now to participate in our community and we'll let you know when we have news.

[ERROR] JOB.LUA Help!!

Discussion in 'Modder General Chat' started by King TGG, Feb 14, 2015.

  1. King TGG

    King TGG New Member

    I really don't know what to do here.

    This is the error..

    [ERROR] addons/darkrpmodification/lua/darkrp_customthings/jobs.lua:113: '}' expected (to close '{' at line 105) near 'vote'
    1. unknown - addons/darkrpmodification/lua/darkrp_customthings/jobs.lua:0





    Here's my jobs.lua 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 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
    })

    TEAM_GUN = DarkRP.createJob("Gun Dealer", {
    color = Color(255, 140, 0, 255),
    model = "models/player/monk.mdl",
    description = [[A Gun Dealer is the only person who can sell legal guns to other people.
    Make sure you aren't caught selling illegal firearms to the public! You might get arrested!]],
    weapons = {"weapon_fists"},
    command = "gundealer",
    max = 2,
    salary = GAMEMODE.Config.normalsalary,
    admin = 0,
    vote = false,
    hasLicense = false
    })

    TEAM_POLICE = DarkRP.createJob("Civil Protection", {
    color = Color(25, 25, 170, 255),
    model = {"models/player/police.mdl", "models/player/police_fem.mdl"},
    description = [[The protector of every citizen that lives in the city.
    You have the power to arrest criminals and protect innocents.
    Hit a player with your arrest baton to put them in jail.
    Bash a player with a stunstick and they may learn to obey the law.
    The Battering Ram can break down the door of a criminal, with a warrant for their arrest.
    The Battering Ram can also unfreeze frozen props (if enabled).
    Type /wanted <name> to alert the public to the presence of a criminal.]],
    weapons = {"arrest_stick", "unarrest_stick", "weapon_glock2", "stunstick", "door_ram", "weaponchecker"},
    command = "cp",
    max = 4,
    salary = GAMEMODE.Config.normalsalary * 1.45,
    admin = 0,
    vote = true,
    hasLicense = true,
    ammo = {
    ["pistol"] = 60,
    }
    })

    TEAM_CHIEF = DarkRP.createJob("Civil Protection Chief", {
    color = Color(20, 20, 255, 255),
    model = "models/player/combine_soldier_prisonguard.mdl",
    description = [[The Chief is the leader of the Civil Protection unit.
    Coordinate the police force to enforce law in the city.
    Hit a player with arrest baton to put them in jail.
    Bash a player with a stunstick and they may learn to obey the law.
    The Battering Ram can break down the door of a criminal, with a warrant for his/her arrest.
    Type /wanted <name> to alert the public to the presence of a criminal.
    Type /jailpos to set the Jail Position]],
    weapons = {"arrest_stick", "unarrest_stick", "weapon_deagle2", "stunstick", "door_ram", "weaponchecker"},
    command = "chief",
    max = 1,
    salary = GAMEMODE.Config.normalsalary * 1.67,
    admin = 0,
    vote = false,
    hasLicense = true,
    chief = true,
    NeedToChangeFrom = TEAM_POLICE,
    ammo = {
    ["pistol"] = 60,
    }
    })

    TEAM_THIEF = DarkRP.createJob("Thief", {
    color = Color(20, 20, 255, 255),
    model = "models/player/phoenix.mdl",
    description = [[You raid houses/bases etc]],
    weapons = {"weapon_fists"},
    command = "thief",
    max = 4,
    salary = 50
    vote = false,
    hasLicense = false,
    candemote = false
    })

    TEAM_MEDIC = DarkRP.createJob("Medic", {
    color = Color(47, 79, 79, 255),
    model = "models/player/kleiner.mdl",
    description = [[With your medical knowledge you work to restore players to full health.
    Without a medic, people cannot be healed.
    Left click with the Medical Kit to heal other players.
    Right click with the Medical Kit to heal yourself.]],
    weapons = {"med_kit", "weapon_fists"},
    command = "medic",
    max = 3,
    salary = 120
    admin = 0,
    vote = false,
    hasLicense = false,
    medic = true
    })

    TEAM_MAYOR = DarkRP.createJob("Mayor", {
    color = Color(150, 20, 20, 255),
    model = "models/player/breen.mdl",
    description = [[The Mayor of the city creates laws to govern the city.
    If you are the mayor you may create and accept warrants.
    Type /wanted <name> to warrant a player.
    Type /jailpos to set the Jail Position.
    Type /lockdown initiate a lockdown of the city.
    Everyone must be inside during a lockdown.
    The cops patrol the area.
    /unlockdown to end a lockdown]],
    weapons = {"weapon_fists"},
    command = "mayor",
    max = 1,
    salary = GAMEMODE.Config.normalsalary * 1.89,
    admin = 0,
    vote = true,
    hasLicense = false,
    mayor = true
    })

    TEAM_HOBO = DarkRP.createJob("Hobo", {
    color = Color(80, 45, 0, 255),
    model = "models/player/corpse1.mdl",
    description = [[The lowest member of society. Everybody laughs at you.
    You have no home.
    Beg for your food and money
    Sing for everyone who passes to get money
    Make your own wooden home somewhere in a corner or outside someone else's door]],
    weapons = {"weapon_bugbait", "weapon_fists"},
    command = "hobo",
    max = 5,
    salary = 0,
    admin = 0,
    vote = false,
    hasLicense = false,
    candemote = false,
    hobo = true
    })

    TEAM_SEC = DarkRP.createJob("Security Guard", {
    color = Color(0, 255, 233, 255),
    model = "models/player/guard_pack/guard_01.mdl", "models/player/guard_pack/guard_02.mdl", "models/player/guard_pack/guard_03.mdl", "models/player/guard_pack/guard_04.mdl", "models/player/guard_pack/guard_05.mdl", "models/player/guard_pack/guard_06.mdl", "models/player/guard_pack/guard_07.mdl", "models/player/guard_pack/guard_08.mdl", "models/player/guard_pack/guard_09.mdl",
    description = [[You guard people or their properties.]],
    weapons = {"weapon_fists", "weapon_stungun"},
    command = "guard",
    max = 3,
    salary = 100
    admin = 0,
    vote = false,
    hasLicense = false
    })

    TEAM_HITMAN = DarkRP.createJob("Hitman", {
    color = Color(255, 140, 0, 255),
    model = "models/player/leet.mdl",
    description = [[Accept contracts off other people and kill whom they desire for a valid rp reason]],
    weapons = {"weapon_fists"},
    command = "hitman",
    max = 2,
    salary = 70
    admin = 0,
    vote = false,
    hasLicense = false
    })

    TEAM_BLACK = DarkRP.createJob("Black Market Dealer", {
    color = Color(50, 50, 50, 240),
    model = "models/player/monk.mdl",
    description = [[A Black Market Dealer is the only person who can sell machine guns to other people.
    Make sure you aren't caught selling illegal firearms to the public! You might get arrested!]],
    weapons = {"weapon_fists"},
    command = "black",
    max = 2,
    salary = 95
    admin = 0,
    vote = false,
    hasLicense = false
    })

    TEAM_DRUG = DarkRP.createJob("Drug Dealer", {
    color = Color(255, 240, 0, 255),
    model = "models/player/monk.mdl",
    description = [[You sell drugs, don't get caught. the end.]],
    weapons = {"weapon_fists"},
    command = "drugdealer",
    max = 2,
    salary = 65
    admin = 0,
    vote = false,
    hasLicense = false
    })

    TEAM_BAR = DarkRP.createJob("Bartender", {
    color = Color(0, 180, 170, 255),
    model = "models/player/monk.mdl",
    description = [[Make a bar and sell beer.]],
    weapons = {"weapon_fists"},
    command = "bartender",
    max = 2,
    salary = 35
    admin = 0,
    vote = false,
    hasLicense = false
    })

    TEAM_HOTEL = DarkRP.createJob("Hotel Manager", {
    color = Color(0, 255, 250, 255),
    model = "models/player/monk.mdl",
    description = [[Make a bar and sell beer.]],
    weapons = {"weapon_fists"},
    command = "hotelmanager",
    max = 2,
    salary = 60
    admin = 0,
    vote = false,
    hasLicense = false
    })
     
  2. King TGG

    King TGG New Member

    Really desperate to get this fixed, this literally fucked up everything.
     
  3. Matryan

    Matryan Well-Known Member

    On TEAM_THIEF and TEAM_MEDIC you're missing commas after salary = x.
    Please put code tags on all the code when you post.
     
  4. King TGG

    King TGG New Member

    Cheers
     
  5. King TGG

    King TGG New Member

    After i fix it, this error pops up

    [ERROR] gamemodes/darkrp/gamemode/modules/f4menu/cl_menuitem.lua:99: attempt to compare number with nil
    1. canGetJob - gamemodes/darkrp/gamemode/modules/f4menu/cl_menuitem.lua:99
    2. setDarkRPItem - gamemodes/darkrp/gamemode/modules/f4menu/cl_menuitem.lua:117
    3. fillData - gamemodes/darkrp/gamemode/modules/f4menu/cl_jobstab.lua:357
    4. Init - gamemodes/darkrp/gamemode/modules/f4menu/cl_jobstab.lua:326
    5. Create - lua/includes/extensions/client/panel/scriptedpanels.lua:153
    6. F4MenuTabs - gamemodes/darkrp/gamemode/modules/f4menu/cl_init.lua:59
    7. generateTabs - gamemodes/darkrp/gamemode/modules/f4menu/cl_frame.lua:176
    8. openF4Menu - gamemodes/darkrp/gamemode/modules/f4menu/cl_init.lua:12
    9. Call - gamemodes/darkrp/gamemode/modules/f4menu/cl_init.lua:24
    10. unknown - gamemodes/darkrp/gamemode/modules/base/cl_gamemode_functions.lua:46
     
  6. Matryan

    Matryan Well-Known Member

    Just went through all your jobs, they're pretty much all missing a comma after salary.
     
  7. King TGG

    King TGG New Member

    Yes I fixed them all but, what about the new error?
     
  8. (FPtje) Atheos

    (FPtje) Atheos Main Developer Staff Member

    Please update to the latest DarkRP to get clearer error messages. The latest error means the "admin" value on some team is not a number. The latest DarkRP will not throw weird errors when that happens. It will throw clear ones instead.
     
  9. King TGG

    King TGG New Member

    How do i exactly update it?
     
  10. Matryan

    Matryan Well-Known Member

    http://lmgtfy.com/?q=darkrp
    Download it off of github, rename the folder to 'darkrp', and replace your current darkrp gamemode with the one you just downloaded.
     
  11. (FPtje) Atheos

    (FPtje) Atheos Main Developer Staff Member

    That is unless you use the workshop version. That should update automatically when you restart the server.
     
  12. King TGG

    King TGG New Member

    Nope I do not
     
  13. CounterCraftz

    CounterCraftz Member

    I suggest you use FPtje's Github on DRP
     

Share This Page