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.

Major problems

Discussion in 'Modder General Chat' started by BaneKitteh, Feb 15, 2015.

  1. BaneKitteh

    BaneKitteh New Member

    So upon this new update coming out today my server is completely and totally bugged, I know this as the only thing I have edited was a VCMOD prices which shouldnt cause this much of a problem. I keep getting this error in my console saying about the jobs.
    So the error itself is
    There are 2 Lua problems!
    Please check your console for more information!
    [ERROR] A runtime error has occurred in "darkrp_customthings/jobs.lua" on line 22.
    The best help I can give you is this:

    Corrupt team: Swat!
    The NeedToChangeFrom must be either an existing team or a table of existing teams

    Hints:
    - Is there a job here that doesn't exist (anymore)?

    The responsibility for this error lies with (the authors of) one (or more) of these files:
    1. darkrp_customthings/jobs.lua on line 22
    2. [C] on line -1
    3. gamemodes/darkrp/gamemode/libraries/simplerr.lua on line 409
    4. gamemodes/darkrp/gamemode/libraries/fn.lua on line 80
    5. gamemodes/darkrp/gamemode/libraries/modificationloader.lua on line 119
    6. gamemodes/darkrp/gamemode/libraries/modificationloader.lua on line 127
    7. addons/ulib/lua/ulib/shared/hook.lua on line 184
    ------
    [ERROR] A runtime error has occurred in "darkrp_customthings/jobs.lua" on line 449.
    The best help I can give you is this:

    [ERROR] A runtime error has occurred in "darkrp_customthings/jobs.lua" on line 22.
    The best help I can give you is this:

    Corrupt team: Swat!
    The NeedToChangeFrom must be either an existing team or a table of existing teams

    Hints:
    - Is there a job here that doesn't exist (anymore)?

    The responsibility for this error lies with (the authors of) one (or more) of these files:
    1. darkrp_customthings/jobs.lua on line 22
    2. [C] on line -1
    3. gamemodes/darkrp/gamemode/libraries/simplerr.lua on line 409
    4. gamemodes/darkrp/gamemode/libraries/fn.lua on line 80
    5. gamemodes/darkrp/gamemode/libraries/modificationloader.lua on line 119
    6. gamemodes/darkrp/gamemode/libraries/modificationloader.lua on line 127
    7. addons/ulib/lua/ulib/shared/hook.lua on line 184
    ------

    Hints:
    - No hints, sorry.

    The responsibility for this error lies with (the authors of) one (or more) of these files:
    1. darkrp_customthings/jobs.lua on line 449
    2. gamemodes/darkrp/gamemode/libraries/fn.lua on line 80
    3. gamemodes/darkrp/gamemode/libraries/modificationloader.lua on line 119
    4. gamemodes/darkrp/gamemode/libraries/modificationloader.lua on line 127
    5. addons/ulib/lua/ulib/shared/hook.lua on line 184

    and it ends like that. My server has no jobs or pay rate. My money is all gone and my player model(along with others) is a blank grey man with no animations and his arm stuck out.
     
  2. BaneKitteh

    BaneKitteh New Member

    This is for all players as well
     
  3. Matryan

    Matryan Well-Known Member

    You've got an invalid team in your 'NeedToChangeFrom' field in your SWAT job.
     
  4. BaneKitteh

    BaneKitteh New Member

    It originally did it for the job that was listed above it, thief so as a test I removed it and it just went to the job below thief which is swat. I am not sure how to fix what you said
     
  5. Matryan

    Matryan Well-Known Member

    You've got a team that doesn't exist, inside the NeedToChangeFrom table, in your SWAT Team.
     
  6. BaneKitteh

    BaneKitteh New Member

    What do I do to fix it, remove the job?
     
  7. BaneKitteh

    BaneKitteh New Member

    Also what about the broken models and pay rates, the citizen job is not in there you spawn as nothing
     
  8. Matryan

    Matryan Well-Known Member

    Remove the non-existant team from the NeedToChangeFrom table.
     
  9. BaneKitteh

    BaneKitteh New Member

    I am confused as I do not know lua coding in the slightest, what file is that, what do oyu mean remove the non-existant team
     
  10. Matryan

    Matryan Well-Known Member

    This isn't Lua,
    Give me your WHOLE jobs.lua, I'll fix it for you.
     
  11. BaneKitteh

    BaneKitteh New Member

    Ive attached it for you if you want, I will also paste it

    --[[---------------------------------------------------------------------------
    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_SWAT=AddExtraTeam("Swat",Color(51,0,255,255),"models/player/gasmask.mdl",[[You are the strong arm of the law! You are not a
    regular cop.]],{"m9k_m4a1","m9k_m92baretta","arrest_stick","stunstick","unarrest_stick","weaponchecker"},"swat",4,65,0,true,true,false)







    TEAM_ANARLEADER=AddExtraTeam("Anarchist",Color(51,51,51,255),"models/player/barney.mdl",[[Lead the rebels! Fight back against the law!
    Try to remain subtle and stealthy until the time
    is right to attack. You are not a terrorist and
    you must call out your attacks in advertisement.
    Fight only against the law and politics, do not
    side with the criminals.]],{},"anarleader",1,45,0,false,false,false)TEAM_ANARCHIST=AddExtraTeam("Anarchist",Color(51,51,0,255),"models/player/guerilla.mdl",[[Follow the orders of your leader and fight back
    against the corrupt government! You are not a
    terrorist and you do not side with gangs either.
    Call out your raids or attacks in advertisement. ]],{},"anarchist",6,40,0,false,false,false)TEAM_GUNDEALER=AddExtraTeam("Gun Dealer",Color(255,153,0,255),"models/player/monk.mdl",[[Sell guns to the citizens!]],{},"gundealer",3,50,0,false,true,false)TEAM_DRUGDEALER=AddExtraTeam("Drug Dealer",Color(102,51,255,255),"models/player/soldier_stripped.mdl",[[Sell drugs to the people! Do not advertise in
    public, all drugs are illegal. Work of the mafia
    or yakusa to increase security!]],{},"drugdealer",3,50,0,false,false,false)TEAM_MECHANIC=AddExtraTeam("Mechanic",Color(51,0,0,255),"models/player/odessa.mdl",[[Fix cars for people! Setup your shop and charge
    based on if you have to travel and how much repair
    is needed]],{"vc_repair"},"mechanic",2,55,0,false,false,false)TEAM_ADMIN=AddExtraTeam("Admin On Duty",Color(255,204,204,255),"models/Player/combine_soldier_kari.mdl",[[You know your job douchebag]],{},"admin",50,0,1,false,false,false)TEAM_BANKMANAGER=AddExtraTeam("Bank Manager",Color(153,204,204,255),"models/player/mossman.mdl",[[Run the bank and protect the peoples money!]],{},"bankmanager",1,65,0,true,false,false)TEAM_BANKER=AddExtraTeam("Banker",Color(51,204,204,255),"models/player/group01/male_01.mdl",[[Handle peoples money]],{},"banker",3,50,0,false,false,false)--[[---------------------------------------------------------------------------
    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)
     

    Attached Files:

  12. Matryan

    Matryan Well-Known Member

    It'd probably be a lot easier to determine what was wrong if you had it in extended format and put all that in [/code] tags
     
  13. BaneKitteh

    BaneKitteh New Member

    I cannot figure out how to do that my apologies I am very new to all this
     
  14. BaneKitteh

    BaneKitteh New Member

    Code (Text):
    --[[---------------------------------------------------------------------------
    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_SWAT = AddExtraTeam("Swat", Color(51, 0, 255, 255), "models/player/gasmask.mdl", [[You are the strong arm of the law! You are not a
    regular cop.]], {"m9k_m4a1","m9k_m92baretta","arrest_stick","stunstick","unarrest_stick","weaponchecker"}, "swat", 4, 65, 0, true, true, false)









    TEAM_ANARLEADER = AddExtraTeam("Anarchist", Color(51, 51, 51, 255), "models/player/barney.mdl", [[Lead the rebels! Fight back against the law!
    Try to remain subtle and stealthy until the time
    is right to attack. You are not a terrorist and
    you must call out your attacks in advertisement.
    Fight only against the law and politics, do not
    side with the criminals.]], {}, "anarleader", 1, 45, 0, false, false, false)

    TEAM_ANARCHIST = AddExtraTeam("Anarchist", Color(51, 51, 0, 255), "models/player/guerilla.mdl", [[Follow the orders of your leader and fight back
    against the corrupt government! You are not a
    terrorist and you do not side with gangs either.
    Call out your raids or attacks in advertisement. ]], {}, "anarchist", 6, 40, 0, false, false, false)

    TEAM_GUNDEALER = AddExtraTeam("Gun Dealer", Color(255, 153, 0, 255), "models/player/monk.mdl", [[Sell guns to the citizens!]], {}, "gundealer", 3, 50, 0, false, true, false)

    TEAM_DRUGDEALER = AddExtraTeam("Drug Dealer", Color(102, 51, 255, 255), "models/player/soldier_stripped.mdl", [[Sell drugs to the people! Do not advertise in
    public, all drugs are illegal. Work of the mafia
    or yakusa to increase security!]], {}, "drugdealer", 3, 50, 0, false, false, false)

    TEAM_MECHANIC = AddExtraTeam("Mechanic", Color(51, 0, 0, 255), "models/player/odessa.mdl", [[Fix cars for people! Setup your shop and charge
    based on if you have to travel and how much repair
    is needed]], {"vc_repair"}, "mechanic", 2, 55, 0, false, false, false)

    TEAM_ADMIN = AddExtraTeam("Admin On Duty", Color(255, 204, 204, 255), "models/Player/combine_soldier_kari.mdl", [[You know your job douchebag]], {}, "admin", 50, 0, 1, false, false, false)

    TEAM_BANKMANAGER = AddExtraTeam("Bank Manager", Color(153, 204, 204, 255), "models/player/mossman.mdl", [[Run the bank and protect the peoples money!]], {}, "bankmanager", 1, 65, 0, true, false, false)

    TEAM_BANKER = AddExtraTeam("Banker", Color(51, 204, 204, 255), "models/player/group01/male_01.mdl", [[Handle peoples money]], {}, "banker", 3, 50, 0, false, false, false)
    --[[---------------------------------------------------------------------------
    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)
     
     
  15. Pab14567

    Pab14567 Well-Known Member

  16. (FPtje) Atheos

    (FPtje) Atheos Main Developer Staff Member

    the "false" at the end of every job is to be removed. There's supposed to be a table there or just nothing.
     
  17. Pab14567

    Pab14567 Well-Known Member

    Yeah I noticed that when I was editing his file, lol.
    But it was all good now. (Even though it doesn't matter of what I'm about to say below)
    I switched the AddExtraTeam to DarkRP.createJob and etc..
    I also made it more organized, cause why not.
     
  18. konamikode

    konamikode Member

    Close this thread. The problem is solved apparently.
     
  19. (FPtje) Atheos

    (FPtje) Atheos Main Developer Staff Member

    I don't close threads of solved problems.
     
  20. konamikode

    konamikode Member

    Thanks for letting me know.
     

Share This Page