|
|
#1 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Jun 2007
Location: Western Germany
Posts: 2,862
Reputation: 616
|
Hi,
I want to release a small tool that I made for myself recently. Im using Notepad++ as default pawn editor, as it offers some really nice things that pawno cant do. The code completion is a quite nice feature. I once used Slice's tutorial to set everything up, but got tired of the "limited" code completion after a while, as im used to code completions that update themselves whenever you add a new function to your code. Notepad++ just completes what you tell it to complete in a xml file. And what my tool does, is automatically creating those xml files from your code. It is still in an experimental stage and a bit buggy, but it works as it should. Its written in Java (hit me for that shit if you like) without a real GUI and distributed as .jar. To launch it, double-clicking should work for most people. If it doesnt, enter the console, jump to the .jar's directory, and type Code:
java -jar PawnAPIGenerator.jar If everything goes fine, it will create two files, PAWN.xml and userDefineLang.xml. You might need to merge the userDefineLang.xml with yours, if you got several user defined languages for notepad++. Copy and install the files as explained in Slice's tutorial, but dont take the uploaded ones, but the generated files. This way you got your own API in notepad++, containing all functions you wrote (stock, public, native, and non-modified), all defines and custom tags, just like with modern IDEs. Whenever you like, run it again and overwrite the xmls with the up to date files. You can also specify the file targets as optional parameters: Code:
java -jar PawnAPIGenerator.jar <path to pawn source directory> <target for PAWN.xml> <target for userDefineLang.xml> Bugs Already way less. Some of the known bugs: Defines arent considered yet (#defines are added to the API, but not considered as replacements) Functions with multitag parameters ( {_,Float}:... ) wont be detected correctly. Some people got version problems with the jar, see the following: Problems with running the jar? Someone reported me a versioning problem with the jar. If you cant run the .jar file, try recompiling it. Therefore use this link to download the source, unzip it, and run build.bat to recompile it automatically. Note that you need the Java 7 SDK for that. If everything went fine, the new .jar should appear in the same directory and should work for your system. Download Github source (gonna be updated frequently) .jar download Feel free to give some feedback or suggestions. Last edited by Mauzen; 02/06/2012 at 12:08 PM. |
|
|
|
|
|
#2 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: Nov 2008
Location: Vatican City
Posts: 527
Reputation: 37
|
Really like it, great work. ( once you work out the kinks )
|
|
|
|
|
|
#3 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Jun 2007
Location: Western Germany
Posts: 2,862
Reputation: 616
|
I rewrote parts of the scanning code, and now using new regexes. Scanning now takes some seconds, but should find all functions and natives, and parse them correctly. At this point the tool actually is useful
![]() Defines still arent working, as interpreting them correctly isnt easy, but Im working on that. Ill also add some code statistics, and some time maybe a GUI. |
|
|
|
|
|
#4 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Dec 2009
Location: Home
Posts: 2,346
Reputation: 212
|
How to compile, and good work...again
|
|
|
|
|
|
#5 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Jun 2007
Location: Western Germany
Posts: 2,862
Reputation: 616
|
I added a build.bat for automatic recompiling. Needs the java 7 sdk of course, but then the jar shouldnt make any versioning problems.
Edit: The generator now also adds defines to the API (but still not replaces them, the define parameters are an ugly thing to parse). Next thing Ill add will be tags I think. Edit2: Tags are also detected and added to the syntax now. Last edited by Mauzen; 02/06/2012 at 11:48 AM. |
|
|
|
|
|
#6 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Apr 2011
Posts: 380
Reputation: 11
|
i got some weird erros:
Code:
C:\Program Files (x86)\PAWN Compiler\include\a_mysql.inc(1) : error 010: invalid function or declaration C:\Program Files (x86)\PAWN Compiler\include\sscanf2.inc(1) : error 010: invalid function or declaration C:\Program Files (x86)\PAWN Compiler\include\whirlpool.inc(1) : error 010: invalid function or declaration dreamgame.pwn(1376) : error 017: undefined symbol "WP_Hash" dreamgame.pwn(1376) : warning 202: number of arguments does not match definition dreamgame.pwn(1376) : warning 202: numbments does not match definition Pawn compiler 3.2.3664 Copyright (er of arguments does not match definition dreamgame.pwn(1394) : error 017: undefined symbol "WP_Hash" dreamgame.pwn(1394) : warning 202: number of arguments does not match definition dreamgame.pwn(1394) : warning 202: number of arguc) 1997-2006, ITB CompuPhase EDIT: never mind, works as charm! thx! Last edited by juraska; 31/10/2012 at 09:02 AM. |
|
|
|
|
|
#7 |
|
Big Clucker
![]() ![]() Join Date: Dec 2006
Location: Portugal
Posts: 142
Reputation: 0
|
Could you make it possible so that the program scans .pwn files also? In my gamemode I use "custom" includes which I gave the extension of .pwn.
Code:
#include "funcoes/utils.pwn" #include "funcoes/geometry.pwn" #include "funcoes/database.pwn" #include "funcoes/game.pwn" #include "funcoes/timers.pwn" |
|
|
|
|
|
#8 |
|
Guest
Posts: n/a
|
I wish all of it could be done with a click of button. Nevertheless great work, will definitely come in handy.
|
|
|
|
#9 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Apr 2007
Location: Norway
Posts: 3,561
Reputation: 129
|
Does this still work? I'd really like this for adding all the YSI functions for auto-completion
|
|
|
|
|
|
#10 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Jun 2007
Location: Western Germany
Posts: 2,862
Reputation: 616
|
It should still do the job, as its all independent from the samp version. Just try it, theres nothing to lose.
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Tutorial] PAWN for SA-MP in Notepad++ | Slice | Tutorials | 336 | 01/04/2013 09:36 PM |
| [Tutorial] PAWN in Notepad++ [QUICKSTEPS] | LZLo | Tutorials | 19 | 23/02/2013 10:19 PM |
| [Tool/Web/Other] Pawn Color Generator [0.3c Colours, Hex.....] | Naruto_Emilio | Tools and Files | 35 | 31/10/2012 12:30 PM |
| PAWN plugin for Notepad++ | ettans | Help Archive | 5 | 18/05/2011 04:23 PM |
| How to use pawn studio/Notepad++ to find a bracket? | The_Gangstas | Everything and Nothing | 13 | 15/12/2010 02:27 AM |