1. 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.

Jobs Error

Discussion in 'DarkRP Modding Questions & Help' started by Smokie3e, Jun 15, 2017.

  1. Smokie3e

    Smokie3e New Member

    So I have been getting this error for quite a while now and none of my jobs were appearing. One time I got my thief job to work but it wouldn't let me join. I restarted and tried a different code, it let me join the job and it was working fine until I used the exact same code template for thief for Admin on Duty and it removed both jobs. I deleted AOD and thief is no longer there. I then deleted my server and restarted. NI'm im getting this error.

    Code (Text):

    [ERROR] addons/darkrpmodification-master/lua/darkrp_customthings/jobs.lua:3: unexpected symbol near '='
      1. unknown - addons/darkrpmodification-master/lua/darkrp_customthings/jobs.lua:0


    [ERROR] addons/darkrpmodification-master/lua/darkrp_customthings/categories.lua:13: '}' expected (to close '{' at line 11) near 'categorises'
      1. unknown - addons/darkrpmodification-master/lua/darkrp_customthings/categories.lua:0


     

    Here is also my jobs list.

    Code (Text):


    TEAM_AOD = DarkRP.createJob("Staff on Duty"),
        color = Color(200, 20, 20, 255),
        model = "models/Combine_Super_Soldier.mdl",
        description = [[Patrol the Map]],
        weapons = ("weapon_shotgun"),
        command = "admin",
        max = 0,
        salary = 0,
        admin = 1,
        vote = false,
        hasLicense = true,
        candemote = false,
        catagory = "Staff",




    --[[---------------------------------------------------------------------------
    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,
    }
    --[[---------------------------------------------------------------------------
    Jobs that are hitmen (enables the hitman menu)
    ---------------------------------------------------------------------------]]
    DarkRP.addHitmanTeam(TEAM_MOB)
     

    And if you need my categories here it is too. Because none of those are showing up either.

    Code (Text):


    DarkRP.createCatagory{
        name = "Staff",
        categorises = "jobs",
        startExpanded = true,
        color = Color(200, 20, 20, 255),
        canSee = function(ply) return ply:IsAdmin() end,
        sortOrder = 99,
    }

    DarkRP.createCatagory{
        name = "Donator Jobs"
        categorises = "jobs",
        startExpanded = true,
        color = Color(20, 20, 255, 255),
        canSee = function(ply) return true end,
        sortOrder = 100,
    }

     
     
    Last edited: Jun 15, 2017
  2. Devin

    Devin Member

    Code (Text):

    DarkRP.createCategory{
        name = "Government",
        categorises = "jobs",
        startExpanded = true,
        color = Color(235, 12, 12, 255),
        sortOrder = 3,
    }
     
    This is the correct way of a category ^



    This is how it should look:
    Code (Text):


    DarkRP.createCategory{
        name = "Staff",
        categorises = "jobs",
        startExpanded = true,
        color = Color(200, 20, 20, 255),
        canSee = function(ply) return ply:IsAdmin() end,
        sortOrder = 99,
    }

    DarkRP.createCategory{
        name = "Donator Jobs",
        categorises = "jobs",
        startExpanded = true,
        color = Color(20, 20, 255, 255),
        canSee = function(ply) return true end,
        sortOrder = 100,
    }
     
     

Share This Page