• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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