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

[General] Initial value of arrays works only for the first one

Status
Not open for further replies.
Level 13
Joined
May 10, 2009
Messages
868
If you are talking about GUI globals, then it works for the array size.

Proof:

Sem título.png


JASS:
// This piece of code is generated automatically for every single array.
    set i=0
    loop
        exitwhen ( i > 10 ) // Note that I chose 10 for the array size in the variable editor.
        set udg_STRING[i]="HELLO STRANGER!"
        set i=i + 1
    endloop

EDIT: Rephrased my first sentence as it could deceive someone.
 
Last edited:
Status
Not open for further replies.
Top