• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 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!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

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