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.

Fix jobs/shipments/etc. online with glualint-web!

Discussion in 'DarkRP Features and Code Design' started by (FPtje) Atheos, Oct 30, 2016.

  1. (FPtje) Atheos

    (FPtje) Atheos Main Developer Staff Member


    Have you started your server only to find errors in your jobs.lua?
    Are you helping tons of people on the forums who can't fix their shipments?

    Here's a tool to help you:


    How to use:
    1. Paste/write Lua code in it
    2. Observe errors and warnings
    3. Fix errors and warnings
    4. Optional: Pretty print
    5. Use code somewhere


    Where will my code be sent to when I enter it here?

    Nowhere! It stays on your computer. Glualint-web does everything in your browser. You can literally open the page, turn off your internet connection, enter code and still have it checked.

    Why is it slow?
    Because it's doing very complicated stuff. It's already doing it in another thread, but it's still slow sometimes. Also, there's an explicit 250ms delay between you typing a letter and the thing linting. That actually makes it feel less sluggish, as it doesn't update the errors while you're typing.

    Can I send this link to people?
    Yes! Please do! Send it to everyone! Spread the word! This should be super useful for server owners!

    Can I pretty print code that has errors?
    Yes, but you probably shouldn't want to. The pretty printer will always try to pretty print. If your code doesn't make sense, it will make sense of it, one way or the other. It will literally try to fix syntax errors. 99% of the time it won't know what you want and do something weird. It'll probably get rid of the syntax errors, but it probably won't work in game.

    The web page says the code is good, but it still errors in game!
    The web page can only see syntax errors. It's actually not specific to DarkRP stuff (except the pretty printer secretly has a DarkRP old syntax to new syntax converter). The web page won't know it when you make a shipment that lacks a name, has a "string" for the price field or any of that stuff. It just checks whether the code is valid Lua.

    Can I download this for my text editor?
    Yes! Glualint was a thing long before glualint-web was. There are plugins for Atom and Sublime:
    Atom: https://atom.io/packages/linter-glualint
    Sublime: https://packagecontrol.io/packages/SublimeLinter-contrib-glualint
    Notepad++: No support. Notepad++ is old. Get a different editor.

    NOTE: glualint (the program) must be installed for those plugins to work! Always get the latest version from here:

    Checkout the installation instructions here:
    Last edited: Nov 5, 2016
  2. Sir Klutch

    Sir Klutch Active Member

    Well done!
  3. Reverse

    Reverse Member


    Hopefully people actually see this post before they post.
  4. Matryan

    Matryan Well-Known Member

    Good stuff - Now I don't have to wait 20 seconds for Atom to load up to answer people on here.
  5. Pab14567

    Pab14567 Well-Known Member

    Hey @(FPtje) Atheos what are the differences between sublime text and Atom ?
  6. (FPtje) Atheos

    (FPtje) Atheos Main Developer Staff Member

    Try them both and find out. Sublime is faster, atom doesn't have a popup message every now and then.
    --- Double Post Merged, Dec 17, 2016 ---
    Try them both and find out. Sublime is faster, atom doesn't have a popup message every now and then.
  7. BlueOrange

    BlueOrange New Member

    Could you look into creating a plugin for Visual Studio Code?
  8. Inception's | Emre

    Inception's | Emre New Member

    Could you pls fix my eror I cant do it

    attempt to concatenate a nil value
    1. DrawPlayerInfo -
    2. DrawEntityDisplay -
    3. fn - addons/darkrpmodification/lua/darkrp_modules/tcb_hud_2/cl_main.lua:475
    4. unknown - addons/ulib/lua/ulib/shared/hook.lua:110

    my jobs file

    Attached Files:

  9. Sir Klutch

    Sir Klutch Active Member

    Has nothing to do with your jobs. That is caused by your HUD. tcb_hud_2
  10. Yogpod

    Yogpod New Member

    Site seems to be down
  11. Birdnest

    Birdnest New Member

    I used the tool but I still get this error
    [ERROR] addons/darkrpmodification-master/lua/darkrp_customthings/jobs.lua:22: unexpected symbol near ','
    1. unknown - addons/darkrpmodification-master/lua/darkrp_customthings/jobs.lua:0

Share This Page