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

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