HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

help importing *.j files??

08-16-2009, 08:02 PM#1
Maxus
I'm wondering, is there a way you can tell jass script to import another external jass script (similar to import in java or #include in C++)?

I'm making a campaign via Campaign Editor in World Editor which now has 7 missions (more to come). Is there a way I can make a script in jass, which I want to use in every map without needing to add it to all maps? I mean that when I change that script I don't have to change it at every map just the one in the entire campaign. I would tell each map to import this in Custom Script Code in Trigger Editor or something like that.
08-16-2009, 11:55 PM#2
Vexorian
jasshelper has //! import
08-17-2009, 02:47 PM#3
Maxus
thanks, I've downloaded NewGen and newest JassHelper 0.9.j.0, and it worked good for a normal .w3x map, but when I opened my campaign .w3n file and opened a map, there was no syntax checking, I could write anything in custom code section and save the map.

In normal map file I imported external .j file with some functions and globals, and then I used them somewhere in map, all worked good, then I used the same .j file in a map that was included in campaign and again used functions from that file somewhere in the map. No matter what I entered I could save the map with no errors and when I tested the map running warcraft 3, Custom Campaign ...... the game crashed before beginning to load the map.

I don't know whether it's supposed to work with campaigns as well...
08-18-2009, 08:07 AM#4
Pyrogasm
Yeah. JASSHelper does not work with campaigns.

http://www.wc3c.net/showthread.php?t=100670