HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Need a bit of help...

07-01-2004, 07:55 AM#1
AstroNox
Hi. I posted this in the General Development forum due to a lack of foresight and a fellow forumer told me to post this here...

Quote:
Originally Posted by AstroNox
Hi again all.

I've been looking around in a map's MPQ archive, and I have a question about the war3map.j file...

Basically the war3map.j file is the JASS file that WC3 uses, but which function(s) is called first when WC3 loads the map? There has to be a starting point for the script to run right?

Hope someone can help...

I also have another JASS question now that I think of it...

Does local variables actually need to be dereferenced? Are they automatically dereferenced if you return or end the function? There have been many topics similar to this but I find that so far all those that I've read did not explain this...

A few more:

Is there any IDE that you recommend to edit JASS with?
Is there an API that explains the functions in common.j/Blizzard.j/etc. other than http://jass.sourceforge.net/doc/ ? (In fact they don't explain the functions there :/)
07-01-2004, 10:23 AM#2
AIAndy
There are actually two functions that serve as starting points.
function config is called when the map is started when you join a game or create one before the slots are displayed.
function main is then called when the map is loaded (still while the loading screen is displayed).

Local variables that are of a basic type (real, integer, ...) are automatically destroyed at the end of scope but there is a bug that prevents handles (units, groups, locations) from being properly dereferenced at the end of scope of a local variable. That can cause (small) memory leaks. It is far more important to destroy what the handle points to though.

For IDE look in the sticky about JASS development environments.
07-01-2004, 10:08 PM#3
COOLer
My Jass edior Is anthor Good Ide if you can't get the other To work and enjoy jass.