• 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.

[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