[Tutorial] PAWN for SA-MP in Notepad++

Quote:
Originally Posted by Sgt.TheDarkness
View Post
Notepad plus plus is hands down the best editor to use for pawn scripts in my opinion.
Have you tried Sublime Text 3?
Reply

Can Sublime Text 3 compile script??
Reply

Quote:
Originally Posted by Micko123
View Post
Can Sublime Text 3 compile script??
Yes. It does everything notepad++ can do and more.
Reply

Quote:
Originally Posted by Micko123
View Post
Can Sublime Text 3 compile script??
None of these editors can compile... They only run the pawncc.exe as a menu/toolbar option.
Reply

Any idea how to add suggestions to existing list?
Reply

Quote:
Originally Posted by iLearner
View Post
Any idea how to add suggestions to existing list?
You can manually edit userDefineLang.xml, or use CodeParser to generate an up to date xml file.

CodeParser works off your includes folder.
Reply

I'm attempting to update and associate (not sure if that's what its technically called) the functions from newer versions of SA-MP with userDefineLang.xml. In addition to functions, I'm trying to add the defines as well.

These pages are the ones I'd need, seeing as this existing list was made for 0.3x, correct?

https://sampwiki.blast.hk/wiki/Category:Added_in_0.3z
https://sampwiki.blast.hk/wiki/Category:Added_in_0.3.7

Are there also Wiki pages for the new defines? If so, I can't seem to find them. I'm hoping there is and I don't have to sort through the includes to pick them out manually. I'm thinking that what iLearner and Sew_Sumi were talking about is what I'm also attempting to do but I'm still just not sure what the best way to do this would be unless someone already has updated files for the latest versions that include the new functions and defines.
Reply

CodeParser does new additions automatically. https://sampforum.blast.hk/showthread.php?tid=512798

It makes the entire xml file for you.
Reply

Not a fan, but really nice tutorial!
Reply

Is there a way to automatically tell pawncc where the amx file should be stored?

I have a project with two folders: one for sources (src) and other with the compiled scripts (bin), both have the same subfolder structure, so i want to tell pawncc to output the amx in bin folder.

For clarify, the desired folder structure is this:

Code:
Root folder
├── src
│   ├── filterscripts
│   │   ├── file1.pwn
│   │   └── file2.pwn
│   └── gamemodes
│       └── gm_main.pwn
└── bin
     ├── filterscripts
     │   ├── file1.amx
     │   └── file2.amx
     └── gamemodes
         └── gm_main.amx
What i want is when i compile a .pwn file, the resulting .amx should go to the equivalent original subfolder but in bin.
Is possible to do this only using NppExec?
Reply

i can't find this step any suggestion please
Reply

Quote:
Originally Posted by Zorono
View Post
i can't find this step any suggestion please
NPPExec is a plugin you need to install. Use the plugin manager, in that same menu, to install it.
Reply

it says no Updates avaible any suggestion please
here is a screenshots

Edit: the proplem was cuased by my internet connection. it worked thanks
+repped
Reply

how do you change the coloring, i wan't it in dark background
Reply

Quote:
Originally Posted by SeanDenZYR
View Post
how do you change the coloring, i wan't it in dark background
There's a themes option in the menu, but IIRC it is rather tricky, and it's a one way trip in many cases (You'll find the setting somewhere but I think the multiple themes are a nightmare to get going so you'll end up just using 1)


(Settings, Style configurator) but I think the xml file that you use to put SA-MP pawn in, contains the color codes and such in it, and that overrides the styles.

userLangthingo.xml has this section...

Code:
<Styles>
<WordsStyle name="DEFAULT" styleID="11" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0"/>
<WordsStyle name="FOLDEROPEN" styleID="12" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0"/>
<WordsStyle name="FOLDERCLOSE" styleID="13" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0"/>
<WordsStyle name="KEYWORD1" styleID="5" fgColor="000080" bgColor="FFFFFF" fontName="" fontStyle="0"/>
<WordsStyle name="KEYWORD2" styleID="6" fgColor="800000" bgColor="FFFFFF" fontName="" fontStyle="0"/>
<WordsStyle name="KEYWORD3" styleID="7" fgColor="800000" bgColor="FFFFFF" fontName="" fontStyle="1"/>
<WordsStyle name="KEYWORD4" styleID="8" fgColor="0000C0" bgColor="FFFFFF" fontName="" fontStyle="1"/>
<WordsStyle name="COMMENT" styleID="1" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0"/>
<WordsStyle name="COMMENT LINE" styleID="2" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0"/>
<WordsStyle name="NUMBER" styleID="4" fgColor="FF8000" bgColor="FFFFFF" fontName="" fontStyle="0"/>
<WordsStyle name="OPERATOR" styleID="10" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0"/>
<WordsStyle name="DELIMINER1" styleID="14" fgColor="808080" bgColor="FFFFFF" fontName="" fontStyle="0"/>
<WordsStyle name="DELIMINER2" styleID="15" fgColor="808080" bgColor="FFFFFF" fontName="" fontStyle="0"/>
<WordsStyle name="DELIMINER3" styleID="16" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0"/>
</Styles>
Reply

Quote:

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)" -; -(
Just a minor suggestion:

Code:
cd $(CURRENT_DIRECTORY)
"C:\Program Files (x86)\PAWN Compiler\pawncc.exe" "$(FILE_NAME)" "-d3" "-r" "-o2" "-v3" "-o$(NAME_PART).amx"
Or even:

Code:
cd $(CURRENT_DIRECTORY)
"..\pawno\pawncc.exe" "$(FILE_NAME)" "-d3" "-r" "-o2" "-v3" "-o$(NAME_PART).amx"
This is more clear and better.
Reply

Does someone has the xml files used here? As links are down.
Reply

this tutorial is not good enough i will make one and put the link below and it works 100%

Link: My Tutorial
Reply

Quote:
Originally Posted by AroseKhanNiazi
View Post
Does someone has the xml files used here? As links are down.
https://www.mediafire.com/file/dteww.../PAWN.xml/file
https://www.mediafire.com/file/r6jz6...eLang.xml/file
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)