Variables between local Triggers

nandosman

New Member
Reaction score
4
Is there a way to use "globals" but just for an especific trigger, i mean, to create some variable that I can pass trought a local trigger into my trigger (Different than the normal globals) ?
 

Laiev

Hey Listen!!
Reaction score
188
JASS:
globals
    private real test1 //just this trigger will use
            real test2 //every trigger can use
endglobals
 

nandosman

New Member
Reaction score
4
but when i put that "globals" block in JASS it gives me an error :S

and btw, "private", thats vJASS right? i'm using just JASS
 

Laiev

Hey Listen!!
Reaction score
188
so, good lucky with normal WE, because you CAN'T use private/public function/variable :) or ever struct and other little things :p

also you can't use the thing 'globals' because normal WE just work with variable in gui or local ;)


EDIT: warcraft got much limits and you use normal WE? a bit crazy to understand...

If you want to learn and edit jass, USE newgen or you'll lost your time... trust me

EDITEDIT: and no matter if you're using jasscraft, jasscraft edit in vjass, and normal WE don't support it :p
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
no, just WE and jasscraft, I'm enemy number 1 of cJASS and vJASS :D

cJASS is an extension of vJASS, and requires that in order to work.

Globals blocks, libraries, scopes, and other simple things are all vJASS features, and require vJASS in order to be used.

Without vJASS, you have to use the Variable editor in order to create globals, which means every global you create will have the 'udg_' prefix.

Essentially, the answer to your question (that is worded in a confusing way) is no.
 

nandosman

New Member
Reaction score
4
Essentially, the answer to your question (that is worded in a confusing way) is no.
hahaha true.

I know vJASS and cJASS, took the time to learn it to understand the spells that ppl submit here, yet i dont like it for something i read somewhere, dunno if thats true or not.

It said that when Compiling, cJASS transforms its code lines into vJASS, and vJASS transforms its code lines into JASS (cause blizzard understands only JASS), so, if that's true, isnt better then just working in JASS? isn't a way to do everithing of vJASS in JASS?

Oh yeah, forgot. The other reason is that the NewGen pack i downloaded just supports v1.21 :S, then i have to be switching between 1.21 and 1.24 everytime, is there a NewGen for 1.24?
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
It said that when Compiling, cJASS transforms its code lines into vJASS, and vJASS transforms its code lines into JASS (cause blizzard understands only JASS), so, if that's true, isnt better then just working in JASS? isn't a way to do everithing of vJASS in JASS?

In a way, yes, and in a way, no. JASS is going to be the fastest running code, if you code very bit as efficient as possible. However, vJass makes things much simpler to code, and reuses code. It's made to increase productivity, or to make coding faster.

Not EVERYTHING can be done in pure vanilla JASS. globals are essentially inserted into the top of the map in vJass (since JASS doesn't support multiple globals blocks), and that isn't readily available to be edited.

Oh yeah, forgot. The other reason is that the NewGen pack i downloaded just supports v1.21 :S, then i have to be switching between 1.21 and 1.24 everytime, is there a NewGen for 1.24?

That's actually just a portion of the Newgen Pack, Grimoire. Grimoire injects things into the Game Engine, which gives error messages instead of crashing the game when you divide by 0, or other similar things. Everything else works just fine, except for JASSHelper, which you can update from here: http://www.wc3c.net/showthread.php?t=88142
 

nandosman

New Member
Reaction score
4
thanks you very much Darthfett for your explanation, u ve no idea how much it helped me. I' m gonna try vJASS now instead of just JASS, that global stuff have bottered me for so long now...
 
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