• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[vJASS] vJass Initialization

Status
Not open for further replies.

NEL

NEL

Level 6
Joined
Mar 6, 2017
Messages
113
vJASS:
    private module Init

        private static method onInit takes nothing returns nothing
        endmethod

    endmodule

    private struct S extends array
        implement Init
    endstruct

What is the difference between this and the Initializer?

Because I saw this code always.
 
The difference between that type of initializer and the basic initializer is the order in which they are executed.

Module initializers (the one above) have the highest priority, being initialized first, whereas common initializers are run after either struct initializers or library initializers, both of which are lower in priority than module initializers.
 
  • Like
Reactions: NEL
Status
Not open for further replies.
Top