| 01-28-2004, 09:34 PM | #1 |
I was asked to create this thread. Basically, i'm showing you a alternative to writing in WE's Jass editor...where it may destroy your code on crash, include horrible text-editing feature, and more. What Does It Include This set-up will give you the following:
Download Ultra-Edit 32-Bit here. Install it, it will ask for a reg key, you can press "next" (or sumtin equivalent) to skip it, but it will then only last 30 days. After installing, you download this archive, extract it to the Ultra-Edit folder. Then download the file here. This is a command-line jass parser. Extract it to a folder of your choice. (Preferably something close to root, in a single-worded folder (f.ex. C:/PJASS/)) Then either extract common.j/blizzard.j out of your war3patch.mpq, or download them here. And put it in preferably the same folder as you put the PJASS. Now, run your installed Ultra-Edit 32. Go into Advanced->Configuration, press the Syntax-Highlighting bar, Browse, find your extracted war3wordfile file. All the radio-button-thingies should be crossed, press "Apply". Then you can select "Jass2 Script" in the upper drop-down list, and then, go through the bottom-drop-down list to select colors/styles for all the different syntax. Then... (you might want to setup "tab" in the edit area). Press OK. Go to Advanced->Tool Configuration. Press the top-most "browse" button, and find your PJASS. Then you have to add to the line that is on the button's left, so it appears something like this: C:/PJASS/pjass.exe "C:/PJASS/common.j" "C:/PJASS/blizzard.j" %F (note: I got a problem on my computer if the pjass.exe was in a directory including a space-bar (f.ex. "Program Files" or such), so try to avoid that). You can set the working directory to the PJASS directory (i don't think it matters much). Write something original in "Menu Item Name", I wrote: Parse JASS Code (Script) Check: Save Active File, Output to List Box, Capture Output De-check: Windows Program, Save All Files First, Show DOS Box Then press "Insert" and press OK. Now everything will be set up. So, What Now Now you can go to View->Views/Lists->Function List. You can now open any file (or just start writing), and it'll be syntax colored, and functions in it will appear in the function-list. (Note, after "writing" functions, you need to do "Search->Function List" for your new functions to appear in the function-list). You can double-click a function in the function-list to jump to it. Then, while writing, you can press Ctrl-Space to show a Auto-Completion list that will narrow down as you write. Press space-bar/enter/tab to complete the currently highlighted choice. After writing some code, you can do Advanced->"Parse JASS Code (Script)" (in my case) to parse the code and display syntax errors. They'll appear in a box at the bottom and you double-click the errors to jump to the line responsible. Anyways, that's it. Cubasis Miscellaneous Notes note1: This parser will give 2 errors in the blizzard.j, you can fix them (f.ex. comment the line) yourself if it annoys you. This parser will also dislike the return-bug and it's not perfect in all. So you might wanna use Magnus's JAVA parser (windows-based). Also, it's error messages are often not informative, But the jump-to-line functionality makes up for that. EDIT: The new PJASS parser has added Error Messages, Stability and Support for the Return Bug. Link above now points to this new version. note2: The Function-List will refresh only at file-open "and" when you press Search->Function List. note3: The Parser will ask about all globals. So what you have to do, is... If you're coding for a map you've worked in, you can save the map, open it in WinMPQ, open the war3map.j file, and CnP the whole Globals area into the top of the active file in UltraEdit. You can also just fix temporary stuff by writing the following at top: Code:
globals *type* [array] *name* *type* [array] *name* endglobals EDIT: The new PJASS version has a added feature to scan a code "ignoring" undefined Globals. Add -e2 to the command-line to enable this mode. note4: You can get pretty much all of these features for "EditPad Pro", you will mainly need a different word-file for it which without doubt AIAndy will provide in a reply to this thread. Differences between the two editing programs are mostly in preferance. EDITED: Added a fixed WordFile to the link above, this one should be "final". EDITED: Added a new version of PJASS to the link above. Has added multiple explanatory Error Messages and many bug-fixes, please get it again if you got the old version. (*Thanks AIAndy*). *NEW* New version of PJASS added with the following bugfixes: PJASS now reccognizes real literals as: .# - and integer literals as 'M' (that is, fewer than 4 characters). |
| 01-29-2004, 11:57 PM | #2 |
Now if Ultraedit wasn't so ugly looking I'd use it :) |
| 01-30-2004, 12:09 AM | #3 |
Ultraedit is very nice once you get it properly set up with colors that make sense. (its native function color looks like comments in most enviroments which drives me crazy) However I'd still like a way to get UE or some other editor that when I type a function name it would do autocompletion and show me what else I have to fill in...oh well lets hope somebody finds that. |
| 01-30-2004, 02:47 PM | #4 |
Yeah, this is cool, submit this as a tutorial -), at least it will be better than (how to make metamorphosis a hero spell -) |
| 03-01-2004, 03:53 PM | #5 |
weaaddar you can change the colors used by syntax highlighting in most good text editors. This all sounds nice, now only if it worked for textpad :) |
| 03-01-2004, 05:30 PM | #6 |
Yeah, weaaddar ment that it would be very nice when he was finished changing the color-settings. However, you can do the same thing i think with Textpad, you can consult with AIAndy, as he had wordfiles for it and he would know how to set it up too. Cubasis |
| 03-06-2004, 01:00 AM | #7 |
Cubasis, you know what would be really cool, is if someone went and compiled another *.j of the functions at the vault. Then we wouldn't have to import them into our text files to escape parse errors. |
| 03-12-2004, 11:45 PM | #8 |
Now might be a good time to add ppjass to UJDE. ppjass is a JASS preprocessor that adds #include and #define, and \ usage. Most importantly, it runs the result through pjass and returns the adjusted error messages. ppjass |
| 03-14-2004, 04:23 AM | #9 |
Would ppjass take the place of PJASS? Or would it have to be entered as an addendum to what is running now? |
| 03-15-2004, 09:23 AM | #10 |
Basically, it's an add-on, but since ppjass calls pjass for a syntax check, you don't have to configure your texteditor for pjass anymore, just ppjass. |
| 03-24-2004, 06:35 PM | #11 |
arf i cant get it to work... it wont show any script errors or anything... im able to write anything without it even correct a single letter or anything... help ? |
| 03-24-2004, 06:52 PM | #12 | |
Erhm, After you do all the steps mentioned in the post above....you need to do this (after writing code, that is): Quote:
Did you do this? If you did, and nothing happened then the problem might be related to the command-line and your operating system, or sumtin. Or even the PJASS locking up. Which reminds me, I need to upload new versions of both PJASS and the wordfile, there have been numerous fixes to both. Anyways Cubasis |
| 03-24-2004, 09:31 PM | #13 |
Ok, I have upgraded both the Word File and the PJASS links. These are much better so be sure to download them. Cubasis |
| 03-25-2004, 12:19 AM | #14 |
Upgraded wordfile doesn't work. Also the new PJASS doesn't handle the Code:
globals //stuff endglobals |
| 03-25-2004, 12:50 PM | #15 |
404 error when trying to download second file (http://crimson.wc3campaigns.com/cuba...r3wordfile.zip) |
