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.

[FIXED]CustomCheck issue

Discussion in 'DarkRP Modding Questions & Help' started by System, Aug 12, 2015.

  1. System

    System Active Member

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

    Right before the 'ply', Lua expected to read a ')', but it didn't.

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

    ------- End of Simplerr error -------





    Code (Text):
            customCheck = function(ply) return CLIENT or
                table.HasValue({"premium", "admin", "support", "moderator", "operator", "superadmin"} ply:GetNWString("usergroup")) end, -- The extra check function. Enter nil or nothing to not have a restriction
            CustomCheckFailMsg = "This job is for Premium only"
     
  2. viper542

    viper542 Active Member

    You forgot to close the table after operator lol
    EDIT: nvm on my iPad didn't scroll
    Example:
    Code (Text):
    customCheck = function(ply) return CLIENT or
       table.HasValue({"superadmin", "admin", "moderator", "trialmod", "vip"}, ply:GetNWString("usergroup"))
    end,
    CustomCheckFailMsg = "This job is for vip only",
    Okay I found your error, you need a comma after "superadmin"}
     
    Last edited: Aug 12, 2015
  3. Matryan

    Matryan Well-Known Member


    No, you're missing a comma after the table.
     
  4. System

    System Active Member

    so it should be
    Code (Text):
    table.HasValue({"premium", "admin", "support", "moderator", "operator", "superadmin"},
     
  5. viper542

    viper542 Active Member

    Correct
     
  6. System

    System Active Member

  7. viper542

    viper542 Active Member

    Post the error again (it could be a different line) if you are left unanswered, I can answer and fix your problems when I get some sleep, and be on a PC as this iPad is just killing me.
     
  8. Matryan

    Matryan Well-Known Member

    Get rid of the second 'return' after the 'or' in the job 'S.W.A.T'.
     
  9. System

    System Active Member

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

    Right before the 'return', Lua encountered something it could not make sense of.

    Hints:
    - Did you forget something here? (Perhaps a closing bracket)
    - Is it a typo?

    ------- End of Simplerr error -------
     
  10. System

    System Active Member

    Found 3 extra returns, removed them and that solved it, thx guys, sometimes you go blind haha
     
  11. viper542

    viper542 Active Member

    [​IMG]
     

Share This Page