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.

Help Me with this error

Discussion in 'DarkRP Modding Questions & Help' started by Fred{TVL}[SG], Jan 6, 2017.

  1. Fred{TVL}[SG]

    Fred{TVL}[SG] New Member

    [ERROR] Lua is unable to understand file "darkrp_customthings/jobs.lua" because its author made a mistake around line number 365.
    The best help I can give you is this:

    Right before the 'GAMEMODE', Lua expected to read a 'end of the file', but it didn't.

    Hints:
    - Did you forget a keyword?
    - Did you forget a comma?

    ------- End of Simplerr error -------
    --- Double Post Merged, Jan 6, 2017 ---
    Here Is Jobs.lua
     

    Attached Files:

  2. MaccyD

    MaccyD Member

    a return function requires an end after it, so the way you are doing it will not work, not sure where you got this idea from, the job file should be setup like so:

    TEAM_REBEL = AddExtraTeam("Rebel", {
    color = Color(0, 0, 0, 255),
    model ="MODEL",
    description = [[You are a rebel, follow your leader, and raid the Police Department!]],
    weapons = {"lockpick", "keypad_cracker"},
    command = "rebel",
    max = 3,
    salary = 45,
    admin = 0,
    vote = false,
    hasLicense = false,
    })


    and not with a return function like your jobs file
     
  3. Fred{TVL}[SG]

    Fred{TVL}[SG] New Member

    Thank you so much
     
  4. MaccyD

    MaccyD Member

    Always buddy
     
  5. Fred{TVL}[SG]

    Fred{TVL}[SG] New Member

    i have one more for you plz
    [ERROR] A runtime error has occurred in "gamemodes/starwarsrp/gamemode/modules/base/sh_createitems.lua" on line 384.
    The best help I can give you is this:

    There is a player with an invalid team!

    The player's name is Fred{TVL}[SG], their team number is "1001", which has the name "Unassigned"

    Hints:
    - It is the server owner's responsibility to figure out why that player has no valid team.
    - This error is very likely to be caused by an earlier error. If you don't see any errors in your own console, look at the server console.

    The responsibility for the error above lies with (the authors of) one (or more) of these files:
    1. gamemodes/starwarsrp/gamemode/modules/base/sh_createitems.lua on line 384
    2. gamemodes/starwarsrp/gamemode/modules/base/sv_gamemode_functions.lua on line 240
    ------- End of Simplerr error -------
    i have the default job as citezen job set as default citezen what do i do this is the new file
     

    Attached Files:

  6. MaccyD

    MaccyD Member

    Problems:
    1 - team_jedi/sith/mand duplicates
    2 - starwars rp <->_<->

    Solutions:
    1 - you need to change team_jedi/sith/mand to different for each job, i see you want to make them part of a 'group' so what you could do, if you have any lua experience is name all of your jobs like this team_jedi_initiate/team_jedi_padawan/etc and create an add-on which finds all the teams beginning with team_jedi/team_sith/team_mand and 'group' them all somehow, not sure but if i gave it more thought id find a solution
    2 - scrap darkrp for starwarsrp, be original make your own game mode and don't use darkrp as a framework, it is not supposed to be like that
    --- Double Post Merged, Jan 10, 2017 ---
    question: in the custom check, why in the world are you checking an empty table for a steamid?
    --- Double Post Merged, Jan 10, 2017 ---
    my second solution also brings me to another point: (even though this is a darkrp forum) my game mode that is in creation, will more than likely have an add-on for starwarsrp for people like you ;)
    --- Double Post Merged, Jan 11, 2017 ---
    okay, so i loaded up darkrp on my VPS, and i got the exact same error, i figured out its something to do with the default citizen job, so i recreated my own
    Code (Text):

    TEAM_CITI = 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 = "citizens",
        max = 0,
        salary = GAMEMODE.Config.normalsalary,
        admin = 0,
        vote = false,
        hasLicense = false,
        candemote = false,
        category = "Citizens",
    })






    --[[---------------------------------------------------------------------------
    Define which team joining players spawn into and what team you change to if demoted
    ---------------------------------------------------------------------------]]
    GAMEMODE.DefaultTeam = TEAM_CITI
     
    and set it as default: ERROR VANISHED
     
    Last edited: Jan 11, 2017

Share This Page