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.

In need of help.

Discussion in 'Player General Chat' started by Toxitman, Jun 26, 2019.

  1. Toxitman

    Toxitman New Member

    So i am making a server at the moment. I am doing some custom jobs. So I added a job to see if it would work and igo this error.
    ERROR] A runtime error has occurred in "addons/essential darkrp f4 menu/lua/essential_darkrp_f4_menu/client/cl_jobs.lua" on line 299.
    The best help I can give you is this:

    Corrupt team: Recruit!
    This job does not have a unique command.

    Hints:
    - There must be some other job that has the same command.
    - Fix this by changing the 'command' of your job to something else.

    The responsibility for the error above lies with (the authors of) one (or more) of these files:
    1. addons/essential darkrp f4 menu/lua/essential_darkrp_f4_menu/client/cl_jobs.lua on line 299
    2. addons/essential darkrp f4 menu/lua/essential_darkrp_f4_menu/client/cl_jobs.lua on line 521
    3. RunString on line 1
    4. function 'RunString'
    5. addons/essential darkrp f4 menu/lua/essential_darkrp_f4_menu/client/cl_f4_menu.lua on line 327
    6. lua/vgui/dlabel.lua on line 234
    ------- End of Simplerr error -------


    [ERROR] gamemodes/darkrp/gamemode/libraries/simplerr.lua:530: [ERROR] A runtime error has occurred in "addons/essential darkrp f4 menu/lua/essential_darkrp_f4_menu/client/cl_jobs.lua" on line 299.
    The best help I can give you is this:

    Corrupt team: Recruit!
    This job does not have a unique command.

    Hints:
    - There must be some other job that has the same command.
    - Fix this by changing the 'command' of your job to something else.

    The responsibility for the error above lies with (the authors of) one (or more) of these files:
    1. addons/essential darkrp f4 menu/lua/essential_darkrp_f4_menu/client/cl_jobs.lua on line 299
    2. addons/essential darkrp f4 menu/lua/essential_darkrp_f4_menu/client/cl_jobs.lua on line 521
    3. RunString on line 1
    4. function 'RunString'
    5. addons/essential darkrp f4 menu/lua/essential_darkrp_f4_menu/client/cl_f4_menu.lua on line 327
    6. lua/vgui/dlabel.lua on line 234
    ------- End of Simplerr error -------

    1. error - [C]:-1
    2. error - gamemodes/darkrp/gamemode/libraries/simplerr.lua:530
    3. createJob - gamemodes/darkrp/gamemode/modules/base/sh_createitems.lua:417
    4. openJobs - addons/essential darkrp f4 menu/lua/essential_darkrp_f4_menu/client/cl_jobs.lua:299
    5. openJobsTab - addons/essential darkrp f4 menu/lua/essential_darkrp_f4_menu/client/cl_jobs.lua:521
    6. unknown - RunString:1
    7. RunString - [C]:-1
    8. DoClick - addons/essential darkrp f4 menu/lua/essential_darkrp_f4_menu/client/cl_f4_menu.lua:327
    9. unknown - lua/vgui/dlabel.lua:234




    And i did what it suggested. This is the code.
    TEAM_CITIZEN = DarkRP.createJob("Recruit", {
    color = Color(191, 188, 188, 255),
    model = {
    "models/mossman.mdl",
    "models/alyx.mdl",
    "models/breen.mdl",
    "models/monk.mdl"
    },
    description = [[Welcome to the server. Press F$ and select either Russia or USA. ]],
    weapons = {"weapon_physcannon"},
    command = "new",
    max = 0,
    salary = 0,
    admin = 0,
    vote = false,
    hasLicense = true,
    candemote = false,
    category = "Recruits",
    NeedToChangeFrom = TEAM_CITIZEN,
    PlayerSpawn = function(ply)
    ply:SetMaxHealth(100)
    ply:SetHealth(100)
    ply:SetArmor(0)
    end
    })

    And yes it is under the right section. Please help
     
  2. FireWolf

    FireWolf Member

    Side Note: In your description, It should probs be F4 not F$.

    The error indicates the command you have set Recruit to is not unique, i.e. if I were to do /job new, it would pick the job with the command "new". If there are two jobs with an identical command, it produces this error. Easy fix: slam your fist on the keyboard for your new command.
     

Share This Page