• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[vJASS] 2 questions

Status
Not open for further replies.
Level 20
Joined
Jul 6, 2009
Messages
1,885
First, i was wondering how array members for structs work, is the size given for each instance of for all instances in global?
Also what does an array member compile to? I'm wondering this so i can consider a number for size while not being inefficient.

The second thing is, how to see JASS code when it's compiled from vJASS?
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
First, i was wondering how array members for structs work, is the size given for each instance of for all instances in global?
Also what does an array member compile to? I'm wondering this so i can consider a number for size while not being inefficient.
An array member compiles the same way as a normal member except that it occupies a range of slots in the back-end array rather than a single slot (so struct number i would occupy [i*32 .. i*32 + 31] for a size-32 array member).

The second thing is, how to see JASS code when it's compiled from vJASS?
Open your map in an MPQ editor and extract war3map.j.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
Already told in the other thread that you can see the jass output of the current saved map in >>>JNGP >>logs >outputwar3map.j

Consider that you can only use array members if you allocate the instance at least once via the normal method. It sets a variable to determine the array index internally.
 
Status
Not open for further replies.
Top