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

Memory Leaks - arrays

Status
Not open for further replies.
Level 9
Joined
Jan 11, 2009
Messages
282
Hmm, but how can i do loops with costum scripts (cos my point-array has quite a lot Indexes), like:
  • Actions
    • Loop - Actions
      • Costum Script: call RemoveLocation(udg_TempLoc[temp+1])
Does this work ???

EDIT: Or do i have to convert the Integer udg_temp into a string ? But how could i do that in JASS ?
 
Level 8
Joined
Aug 1, 2008
Messages
420
It will be exactly what the variable is.. your variable shows "Position[1]" correct? Then it will be
  • Custom script: call RemoveLocation(udg_Position[1])
as stated one post above.. You can also do:

  • For each (Integer A) from 1 to [HOW MANY ARRAYS YOU HAVE], do (Actions)
    • Loop - Actions
      • Custom script: call RemoveLocation (udg_Position[bj_forLoopAIndex])
 
Last edited:
Status
Not open for further replies.
Top