Jump to content

Notepad++ Lua Syntax Checker by Talidan


Ransom

Recommended Posts

Posted

One thing LuaEdit has that Notepad++ lacks is an Lua syntax checker. This lets you look for general LUA mistakes that are NOT RELATED to MTA scripting before running your script and debugging it inside MTASA. For example it will make sure the end statements balance out and your if comparison operators are valid.

luasyntaxchecker.jpg

So why use this? It saves you time by detecting silly mistakes before switching windows and going ingame, where you will get the same error messages. The general Lua syntax must be correct before your Lua script works.

You can download the files here:

myfileupload

MediaFire

OPEN THE README FOR INSTALLATION INSTRUCTIONS!

Notepad++ syntax check hax

========================

1) Extract the contents of this archive to an appropriate directory. These files need to stay somewhere for notepad++ to call upon.

2) In Notepad++, press F5, and browse to the location of syntaxcheck.bat

3) At the end of the path, add the following parameter:

"$(FULL_CURRENT_PATH)"

So, for example:

"C:\Program Files\Notepad++\syntaxcheck\syntaxcheck.bat" "$(FULL_CURRENT_PATH)"

4) Try a test run. It'll only report something if there's an error. If it works, press F5 and go ahead and press the Save button, and give it a name and optionally a shortcut key

image.gif.e25ddd8be17e3a9b50a78609787fabd6.gif

Offical B.L.A.S.T.A.ddict
VCP - winners of the official MTA tournament (undefeated!) /smug

Posted

hmm,this is not as comfortable as in 50p's app.. you can't click the error and get your caret moved into line with error.

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

  • Moderators
Posted
For example it will make sure the end statements balance out and your if comparison operators are valid.

My installation of Notepad ++ does this automatically, as in it doesn't popup with an error but the lines on the left indicating a function, loop or if statement continue after code if an 'end' is missing. Same with parenthesis

But nice job though

Posted
hmm,this is not as comfortable as in 50p's app.. you can't click the error and get your caret moved into line with error.

Yes, dzek (Varez), LuaEdit has similar goto line functionality. Notepad++ loses out big on this. Seems a little crazy no plug-in exists, so this is as good as it gets, besides Notepad++'s great tree lines and color schemes as Zango mentioned.

image.gif.e25ddd8be17e3a9b50a78609787fabd6.gif

Offical B.L.A.S.T.A.ddict
VCP - winners of the official MTA tournament (undefeated!) /smug

Posted

YaY,

This Will obviously Help me, and varez won't Find any of my Silly Questions Over his Head :P

Thank you

Thanks dzek for bearing my stupid questions as a noob. You helped me become a better programmer.

Now I understand how important it is to help those who SUCK at programming.

Posted

mta is showing same errors as this while running - and you seems not to understand the errors - so this won't make any difference to you

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

  • 2 weeks later...
Posted

This is good but it cant find all errors. So for me, syntax in game is better.

_Hacker__by_DEVlANT.gif

Multiply it by infinity, and take it to the depth of forever, and you will still have barely a glimpse of what I'm talking about.

Posted
This is good but it cant find all errors. So for me, syntax in game is better.

Yes, it finds Lua errors, not MTA function errors. It can save time, it really depends on your scripting setup. For example I have bound keys to start resources, windowed mode, and dual monitors. Often, it is just easier for me to open console to get off screen and edit some things, click back in, and start.

image.gif.e25ddd8be17e3a9b50a78609787fabd6.gif

Offical B.L.A.S.T.A.ddict
VCP - winners of the official MTA tournament (undefeated!) /smug

  • 2 weeks later...
  • 2 weeks later...
  • 3 weeks later...
  • 4 weeks later...
  • 3 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...