• 🏆 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!

[JASS] Local Vars. and MUI

Status
Not open for further replies.
Level 3
Joined
May 3, 2004
Messages
46
I've been trying to learn Jass and it goes pretty nice this far, though there's one thing I'm slightly confused about..

I recall reading on one of the tutorials that local variables only exist in the function they were created/declared in.

So

If I have to use global variables in spells that has more than one function, how can I possibly make it MUI? (In GUI I used arrays but I wonder if it's just me being confused or if there's any easier way)

Cheers.
 
Well, since you are learning, I guess it is ok to go into handle vars and less in depth, but you should know they are rusty. Handle vars are lessed used now because they have been proven to be, well, erm, "rusty" as I said. Captain Griffen told me that a while ago and said to ask PipeDream or Vexorian to give ya a clear reason. So, if ya need info about it, just ask.

Anyways, the alternative option is to use either CS_Cache's tables or even better yet, use vJASS's structs/globals.
Links:
JASS Helper Manual
vJASS For Spellmakers (Moving From Handle Vars To Structs)
 
Status
Not open for further replies.
Top