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

How to store value for future use?

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Use a local variable if the value is needed later in a function of a thread.
Use a global if the value is to be shared between all functions running on all threads.

You can use arrays if you need multiple variables selectable by an index (a number). Arrays in WC3 are dynamic arrays with a maximum bound of 2^13 (so do not care about specifying a size as that is not needed).

Hashtables can be used as another form of data mapping strcture but be aware they are a complex structure that can not be deallocated once allocated.
 
Status
Not open for further replies.
Top