[Trigger] Leaks in Arrays.

Status
Not open for further replies.
Brackets delimit an array's index. Huurka got his syntax wrong too...

Here... let's say you want to remove a location at index 0:
  • Custom script: call RemoveLocation(TempPoint[0])
If you want to remove a location at the triggering player's index:
  • Custom script: call RemoveLocation(TempPoint[GetPlayerId(GetTriggerPlayer()) + 1])
 
If you want to remove every location in the array:

  • Use a loop


P.s. Just messing with you ;)
 
A little bit of more details please.
What kind of array do you have?
What exactly do you want the array to be after you "remove the player" ?
 
I just want to remove the leaks.

It is a location array with 12 . . . things (can't think).

  • Set TempPoint[(Player number of (Owner of (Triggering unit)))] = (Position of (Triggering unit))
I would prefer not to do a 12 action loop every time I use a array like this, as I have 4 in my map.
 
  • Custom script - call RemoveLocation( udg_TempPoint[(Player number of (Owner of (Triggering unit)))])
You made it sound strange
P.s. removing all the points in the array would cause bugs with MUI.
 
:D
HINDYhat, I am talking about the crap I posted.
P.s Multitasking is bad for concentration.
 
Status
Not open for further replies.
Back
Top