Jump to content

Notepad++ Lua Syntax Checker by Talidan


Ransom

Recommended Posts

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

Link to comment
  • Discord Moderators
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

Link to comment
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.

Link to comment
  • 2 weeks later...
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.

Link to comment
  • 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...