• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Leaks in Arrays.

Status
Not open for further replies.
Level 20
Joined
Apr 22, 2007
Messages
1,960
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])
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
If you want to remove every location in the array:

  • Use a loop


P.s. Just messing with you ;)
 
Level 23
Joined
Nov 29, 2006
Messages
2,482
Oh right one thing though... Since he asks for Gui...

It has to be udg_ as a prefix, before the actual name. I guess you already know, but to be 100% sure : )
  • Custom script - call RemoveLocation( udg_TempPoint[index] )
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
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" ?
 
Level 24
Joined
May 9, 2007
Messages
3,563
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.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
  • 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.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
:D
HINDYhat, I am talking about the crap I posted.
P.s Multitasking is bad for concentration.
 
Status
Not open for further replies.
Top