static ifs and modules, + rep for help

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
i know you can use library requirements in static ifs ie:
[ljass]static if LIBRARY_T32 then[/ljass]... etc
but can you do other things? like:
[ljass]static if FUNCTION_SomeFunction then[/ljass]
or
[ljass]static if VARIABLE_someVariable then[/ljass]

and what comiles first? the module or the static if?

ie:
JASS:
module SomeModule
    static if BOOL then
        do stuff
    else
        do other stuff
    endif
endmodule


so i could use that module in 2 different scenarios and get 2 completely different results?
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
i cant view wc3c from work :( ill check out the link when i get home at like 9 tonight
 

luorax

Invasion in Duskwood
Reaction score
67
The important part for you:

Phase 1: import/novjass/delimited comments
Phase 2: text macros
Phase 3: Zinc
Phase 4: Libraries
Phase 5: Static ifs
Phase 6: Modules
Phase 7: Structs and many other things
Phase 8: PJass
Phase 9: Shadowhelper
Phase 10: PJass
Phase 11: Optimization (inline)

Therefore the module will always implement the same things.
 

Sgqvur

FullOfUltimateTruthsAndEt ernalPrinciples, i.e shi
Reaction score
62
>Therefore the module will always implement the same things.
not...
because:
5(static ifs) <(before) 6(modules)
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
he means you cant use 1 module 2 different ways in one script based
which could be amazingly usefull

what about the first part:

i know you can use library requirements in static ifs ie:
[ljass]static if LIBRARY_T32 then[/ljass]... etc
but can you do other things? like:
[ljass]static if FUNCTION_SomeFunction then[/ljass]
or
[ljass]static if VARIABLE_someVariable then[/ljass]
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top