PAWN for SA-MP in Notepad++ -
Slice - 04.09.2010
Hey,
I made my own Notepad++ language/API for SA-MP scripting, follow these steps and you can have it too!
Here's an example on what it looks like:
Screenshot!
For those who aren't familiar with Notepad++, you can read about it & download here:
http://notepad-plus-plus.org/
If you want Notepad++ to show every single word in the current document, you can select "Word completion". That might get annoying with large scripts, however.
To get the syntax highlight working, you will need to download my custom
userDefineLang.xml then place it in your Notepad++ AppData folder (see below).
Now, type in %appdata%\Notepad++ in your Explorer (
or in Run).

You should see a folder with a couple files (config.xml, contextMenu.xml, shortcuts.xml, stylers.xml).
NOTE: If you have a file called userDefineLang.xml that you want to keep, you will have to merge those files manually.
Copy the downloaded userDefineLang.xml to the folder you're in (it should look something like
this).
After that, you need to associate Notepad++ with PAWN files, see below.

Additionally, you can put .inc there if you want to.
Auto-complete
You will need an API file for the auto-completion.
Download
PAWN.xml (right click -> save link/target) and put it in the "APIs" folder; this, however, is not located in your AppData. It's in the program's main folder.
It should look somewhat like this:
Ctrl + Space will pop up the auto-complete, and Ctrl + Shift + Space will show the function arguments.
You can, however, make this happen automatically by changing your settings, see below:

Click that and find this tab:

If you want to see the auto-complete instantly, put "From the 1 th character".
Compiling
For this to work, you will need a plugin called NppExec. If you already have it, skip this step.

If you don't have the Plugin Manager, download the latest copy of Notepad++.
Check NppExec and click Install; restart Notepad++ when prompted to.

Put this code in the window that pops up:
Put npp_save on the first line if you want to save the file before compiling automatically (lazy motherfucker..).
Code:
cd $(CURRENT_DIRECTORY)
"C:\Program Files (x86)\PAWN Compiler\pawncc.exe" "$(FILE_NAME)" -; -(
NOTE: Replace the path to match your PAWN compiler folder; also make sure you have an "include" folder in there with the latest SA-MP include files.

Now it should try compiling whatever document you have open. If you see any output from the PAWN compiler, then it's looking good so far.

Optionally, check this to slim down the output in the command window.
Now you will probably want to assign a hotkey to the compile script.
Open up the NppExec settings.
Select "PAWN Compiler" from the list, click "Add/Modify", then click "OK".
Restart Notepad++.
Open up the shortcut mapper.
Find "PAWN Compiler" under "Plugin commands"; double click it.
Select a suitable key (combination) then click "OK" and click "Close" on the shortcut mapper.
Re: PAWN for SA-MP in Notepad++ -
WillyP - 04.09.2010
love the auto complete!
Re: PAWN for SA-MP in Notepad++ -
Hiddos - 04.09.2010
Lemme try this, notepad is one of the good things that microsoft created.
Re: PAWN for SA-MP in Notepad++ -
Calgon - 04.09.2010
Quote:
Originally Posted by Hiddos
Lemme try this, notepad is one of the good things that microsoft created.
|
This is for Notepad++, not Microsoft Notepad...
Re: PAWN for SA-MP in Notepad++ -
Hiddos - 04.09.2010
Quote:
Originally Posted by Calgon
This is for Notepad++, not Microsoft Notepad...
|
Damn I failed. Well they got kinda the base idea from it (/me runs)
Re: PAWN for SA-MP in Notepad++ -
woot - 04.09.2010
Nice, thank you!
Re: PAWN for SA-MP in Notepad++ -
General Abe - 04.09.2010
This is epic. Using it right now... being able to keep track of loose brackets/what ones you're working within has to be the best thing since sliced bread.
Re: PAWN for SA-MP in Notepad++ -
joemomma53 - 04.09.2010
This is great, nice job
Re: PAWN for SA-MP in Notepad++ -
gamer931215 - 04.09.2010
VERY nice tutorial, also like the part that it will give u a list with options (when as example at that screenshot it will give a list of dialog styles already instead of searching such things at the wiki). Il give it a try
Edit: again... nice tutorial! Couldnt done it without the screenshots, but got it working, thank you very much for sharing this

!
Re: PAWN for SA-MP in Notepad++ -
MrDeath537 - 04.09.2010
Really very nice. Good job!
Re: PAWN for SA-MP in Notepad++ -
gamer931215 - 05.09.2010
Got every working now in an Notepad++ Portable installation, do you allow me to upload an mirror (complete Notepad++ with everything already setted-up, so
Download, extract & script ?)
This is just amazing, i tried a few other variants of pawno, but all failed or crashed. Now i can just use the stability of Notepad++.
*Still amazed* aka noob proof?
Re: PAWN for SA-MP in Notepad++ -
hab2ever - 24.12.2010
Nice work n thnx i was looking for it.




Re: PAWN for SA-MP in Notepad++ -
Mean - 25.12.2010
Just a lil' question, where to download Notepad++ ? XD
Re: PAWN for SA-MP in Notepad++ -
Slice - 25.12.2010
http://notepad-plus-plus.org/
Re: PAWN for SA-MP in Notepad++ -
Mean - 25.12.2010
Thx.
EDIT: Didn't manage to get it working, but nvm.
Re: PAWN for SA-MP in Notepad++ -
Faraday - 07.01.2011
Is it possible to set a newly-created file to have Pawno as standard language?
Whenever I right-click and do 'new notepad++ document' and I put like for instance 'Blahblah.inc', NPP makes it 'Blahblah.inc.txt' Which is kinda annoying. Do they have like a suggestions forum or something?
Re: PAWN for SA-MP in Notepad++ -
RSX - 15.01.2011
Doesn't seem to work on mine Npp, using the newest one, the user defined syntax highlight works, but PAWN.xml seems to be ignored.
Re: PAWN for SA-MP in Notepad++ -
pantelimonfl - 18.01.2011
When i press the key specified it says:
Код:
Current directory: C:\Program Files\Notepad++
CreateProcess() failed with error code 3:
The system cannot find the path specified.
================ READY ================
Re: PAWN for SA-MP in Notepad++ -
vutqy - 19.01.2011
Hi, there is a little problem with escaped quotes, your plugin doesn't see them as escaped.
Pic :
Re: PAWN for SA-MP in Notepad++ -
MMiz - 19.01.2011
It's a pretty useful tool, saved myself atleast 1 hour of work the first day I used it.