| 07-17-2007, 08:03 PM | #1 |
Just starting out with jass so forgive me if I've missed something obvious. On saving the map I get 1 compile error: Line 1394: Expected a function name At the bottom of the window it says 'Line 1' and there is no text in the lower text box so I can't see which line the error is on? |
| 07-17-2007, 08:28 PM | #2 |
Check the line above it. Oh, and the problem is the WE parser being retarded. It's horrible at finding errors; post your code here or download JASSCraft. |
| 07-17-2007, 08:37 PM | #3 |
Compile errors don't prevent the map from saving right? In which case, I just took a look at war3map.j in JASSCraft and it seems that my trigger has been added to the bottom of war3map.j, instead of at the top which is where I have positioned it in the trigger editor. As such, my call to my new function is causing the error because the function hasn't been parsed yet. How do I move my triggers around in the trigger editor so as to control their position in war3map.j? |
| 07-17-2007, 08:53 PM | #4 |
They do prevent it from saving. The generated war3map.j in the "tempfolder" for your map is the .j file from the map that is parsed. Variable declarations go first, then anything in the map's custom script section, and last the map's triggers. As to the order of the triggers, I have no idea. You can't, however, call functions from other triggers unless you've installed vJASS/JASSHelper, which I would assume you're trying to do. If you post your code, I'm sure I can help you. |
| 07-17-2007, 09:12 PM | #5 |
I can't seem to find a temp folder for my map. I guess the right way to go about this is to include functions that are specific to a trigger within the trigger, functions that are generic in the main custom code section, and then have triggers call other triggers if neccessary. Seems to be compiling okay now, although my new function doesn't do what I expected. I'll have a bit more of a play with this... Thanks Pyrogasm +rep |
| 07-17-2007, 09:39 PM | #6 |
When you save your map and get a compile error, look in the directory you were trying to save the map in. There should be a folder called "tempfoldername28523a33td9" or something. That's what I was referring to. |
| 07-17-2007, 10:42 PM | #7 |
I can see the temp directory and some files in it whilst the map is saving. But as soon as I get the compile error window the directory has vanished. |
| 07-17-2007, 10:46 PM | #8 |
yes, because it is a TEMP directory. It get cleared after use. That directory is so the map can compile, but if an error occurs, it clears the directory for it has no use. |
| 07-18-2007, 07:55 AM | #9 |
Which means I can't get to the failed war3map.j, which is what I thought Pyrogasm was suggesting I should look at. It would be nice to be able to compile/export that file without having to save the map, cause saving the map takes several minutes. |
| 07-18-2007, 01:47 PM | #10 |
The order of triggers in the editor has no impact on the order of triggers in the .j script. Solution: either move your functions to call to the custom script section at the top of use preprocessors to reorder stuff. |
| 07-18-2007, 02:46 PM | #11 |
If you are using jasshelper compile errors won't prevent you to save the map, even if jasshelper crashed that would happen after the map is saved. And, when using the world editor compiler, always fix the first error before even looking to the rest of the errors. |
| 07-20-2007, 11:53 AM | #12 |
im sorry i have to do this, well not really but i feel like it. ............................................................................ Thread title Unvisible jass compile error Unvisible Unvisible Unvisible Unvisible Unvisible WRONG!!! It's Invisible now i demand you write that 50 times so that you get correct spelling :) |
