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

How to remove this leak?

Status
Not open for further replies.
Level 11
Joined
Dec 5, 2009
Messages
846
Hello. Im wondering why this removal wont work? (I checked the Things that leak topic out but i didn't found anything)

  • Set Point[(Player number of (Triggering player))] = (Position of (Triggering unit))
  • //I have things in between//
  • Custom script: call RemoveLocation(udg_Point[Player number of Triggering player]
Thanks in advance.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Because "Player number of Triggering player" isn't a JASS function ^^

This would be correct:
  • Custom script: call RemoveLocation(udg_Point[GetPlayerId(GetTriggerPlayer())+1])
Because:
GetPlayerId(player)
Returns the player number of the player "player".
BUT: the REAL player numbers range from 0 to 11 (so player 0 is red, player 1 is blue etc), so you have to do "+ 1" (GUI works with player 1 red etc).

GetTriggerPlayer()
That's logical: it gets the triggering player.

Thus you get:
GetPlayerId(GetTriggerPlayer())


It would do you much good to learn at least the basics of JASS.
 
Level 11
Joined
Dec 5, 2009
Messages
846
Thank you apo0calypse! Well i started to read tutorials in JASS but the one i read were hard to understand. I guess i were too bad in GUI, but im much better at it now so i maybe should give it a shot. And i know some few things in JASS like that Player 0 is red :)

Edit: Sorry once again that i can't give you rep because i have to spread more.
 
Status
Not open for further replies.
Top