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

[Trigger] Will this leak?

Status
Not open for further replies.
Level 9
Joined
Apr 28, 2009
Messages
538
I made a trigger and i want to know if it will leak.
If yes, how can i change it not to leak?
Here`s the trigger:
  • SpVAR PlayersINFO
    • Events
    • Conditions
    • Actions
      • Set Players_Count[1] = 0
      • Set Players_Count[2] = 0
      • Set Players_Count[3] = 0
      • Set Players_INFO = Empty String
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked player) slot status) Equal to (==) Is playing
            • Then - Actions
              • Set Players_Count[1] = (Players_Count[1] + 1)
            • Else - Actions
              • If (((Picked player) slot status) Equal to (==) Has left the game) then do (Set Players_Count[2] = (Players_Count[2] + 1)) else do (Do nothing)
      • Set Players_Count[3] = (Players_Count[1] + Players_Count[2])
      • Set Players_INFO = ((|c00ffcc00The total number of players is |r + (String(Players_Count[3]))) + ((. + (String(Players_Count[1]))) + ((|c00ffcc00 are still here and |r + (String(Players_Count[2]))) + |c00ffcc00 player(s) left the game.|r)))
Variables: Players_Count (integer, array, 3), Players_INFO (string)
This trigger runs when a player types "/playersinfo" in chat so it'n not going to be runned just once.
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
I can not find any leak in it. At first i thought Force (Player Group) leak, but (All Players) does not leak so it is totally ok, i think =)

EDIT: Strings (text) leak, but that is inevitable and generally ignored here,, String leaks can not be deleted/killed and are soo small that it is not relevant either,,
 
Status
Not open for further replies.
Top