1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

»»» MEMORY LEAK! ««« please help (and get Credits in my map)

Discussion in 'Map Development' started by MP Productions©, Oct 31, 2005.

  1. MP Productions©

    MP Productions©

    Joined:
    Jun 11, 2005
    Messages:
    19
    Resources:
    0
    Resources:
    0
    AARGH! i got a big problem: i got huge memory leak in my map! i tried to fix it by destroying the points and unit(group)s etc. but it doesnt help really much..
    did i do it wrong? or is there something i forgot?

    the way i tried is like this:
    Code (Text):

    Starving
        Events
            Time - Every 2.00 seconds of game time
        Conditions
        Actions
            Set StarvingUnits = (Units in (Playable map area)((((Unit-type of (Matching unit)) Equal to Brave) and (((Matching unit) is alive) Equal to True)) and ((Mana of (Matching unit)) Equal to 0.00)))
            Unit Group - Pick every unit in StarvingUnits and do (Actions)
                Loop - Actions
                    Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 5.00)
                    Set PingStarvingUnits = (Position of (Picked unit))
                    Cinematic - Ping minimap for (Player group((Owner of (Picked unit)))) at (Position of (Picked unit)) for 1.00 seconds, using a Flashy ping of color (100.00%, 0.00%, 0.00%)
                    Point - Remove PingStarvingUnits
                    Unit Group - Destroy unit group StarvingUnits
     
    and
    Code (Text):

    Breed
        Events
            Unit - A unit Is issued an order targeting a point
        Conditions
            Or - Any (Conditions) are true
                Conditions
                    (Owner of (Ordered unit)) Equal to Neutral Hostile
                    (Owner of (Ordered unit)) Equal to Neutral Passive
        Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                If - Conditions
                    (Unit-type of (Ordered unit)) Equal to Crab Small
                    (Number of living Crab Big units owned by Neutral Passive) Less than 50
                    (Mana of (Ordered unit)) Equal to 100.00
                Then - Actions
                    Set SpawnPointNeutralUnits = ((Position of (Ordered unit)) offset by 50.00 towards (Facing of (Ordered unit)) degrees)
                    Unit - Set mana of (Ordered unit) to 0.00%
                    Unit - Replace (Ordered unit) with a Crab Big using The old unit's relative life and mana
                Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                If - Conditions
                    (Unit-type of (Ordered unit)) Equal to Crab Big
                    (Number of living Crab Small units owned by Neutral Passive) Less than 50
                    (Mana of (Ordered unit)) Equal to 100.00
                Then - Actions
                    Set SpawnPointNeutralUnits = ((Position of (Ordered unit)) offset by 50.00 towards (Facing of (Ordered unit)) degrees)
                    Unit - Create 2 Crab Small for (Owner of (Ordered unit)) at SpawnPointNeutralUnits facing (Facing of (Ordered unit)) degrees
                    Point - Remove SpawnPointNeutralUnits
                    Unit - Set mana of (Ordered unit) to 0.00%
                Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                If - Conditions
                    (Unit-type of (Ordered unit)) Equal to Raccoon Small
                    (Number of living Raccoon Big units owned by Neutral Passive) Less than 25
                    (Mana of (Ordered unit)) Equal to 100.00
                Then - Actions
                    Unit - Set mana of (Ordered unit) to 0.00%
                    Unit - Replace (Ordered unit) with a Raccoon Big using The old unit's relative life and mana
                Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                If - Conditions
                    (Unit-type of (Ordered unit)) Equal to Raccoon Big
                    (Number of living Raccoon Small units owned by Neutral Passive) Less than 25
                    (Mana of (Ordered unit)) Equal to 100.00
                Then - Actions
                    Set SpawnPointNeutralUnits = ((Position of (Ordered unit)) offset by 50.00 towards (Facing of (Ordered unit)) degrees)
                    Unit - Create 2 Raccoon Small for (Owner of (Ordered unit)) at SpawnPointNeutralUnits facing (Facing of (Ordered unit)) degrees
                    Point - Remove SpawnPointNeutralUnits
                    Unit - Set mana of (Ordered unit) to 0.00%
                Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                If - Conditions
                    (Unit-type of (Ordered unit)) Equal to Fish
                    (Number of living Fish units owned by Neutral Passive) Less than 125
                    (Mana of (Ordered unit)) Equal to 100.00
                Then - Actions
                    Set SpawnPointNeutralUnits = ((Position of (Ordered unit)) offset by 50.00 towards (Facing of (Ordered unit)) degrees)
                    Unit - Create 1 Fish for (Owner of (Ordered unit)) at SpawnPointNeutralUnits facing (Facing of (Ordered unit)) degrees
                    Point - Remove SpawnPointNeutralUnits
                    Unit - Set mana of (Ordered unit) to 0.00%
                Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                If - Conditions
                    (Unit-type of (Ordered unit)) Equal to Snake
                    (Number of living Snake units owned by Neutral Hostile) Less than 15
                    (Mana of (Ordered unit)) Equal to 100.00
                Then - Actions
                    Set SpawnPointNeutralUnits = ((Position of (Ordered unit)) offset by 50.00 towards (Facing of (Ordered unit)) degrees)
                    Unit - Create 1 Snake for (Owner of (Ordered unit)) at SpawnPointNeutralUnits facing (Facing of (Ordered unit)) degrees
                    Point - Remove SpawnPointNeutralUnits
                    Unit - Set mana of (Ordered unit) to 0.00%
                Else - Actions
     
    did i do something wrong?
    any help is appreciated
    ~MP
     
  2. Modeler

    Modeler

    Joined:
    Aug 27, 2004
    Messages:
    496
    Resources:
    0
    Resources:
    0
    Destroy the point after every accurance, then why you're done with the point, destroy and nullify it:

    custom script:
    Code (vJASS):

    set SpawnPointNeutralUnits = null
     
     
  3. The_Prophet

    The_Prophet

    Joined:
    Jul 12, 2005
    Messages:
    48
    Resources:
    0
    Resources:
    0
    it would actually be
    Code (vJASS):

    set udg_SpawnPointNeutralUnits = null
     
     
  4. MP Productions©

    MP Productions©

    Joined:
    Jun 11, 2005
    Messages:
    19
    Resources:
    0
    Resources:
    0
    thnx
    what exactly is nullifying? aint destroying enough?
    ~MP
     
  5. MP Productions©

    MP Productions©

    Joined:
    Jun 11, 2005
    Messages:
    19
    Resources:
    0
    Resources:
    0
    so its more like this?
    Code (Text):

    Starving
        Events
            Time - Every 2.00 seconds of game time
        Conditions
        Actions
            Set StarvingUnits = (Units in (Playable map area)((((Unit-type of (Matching unit)) Equal to Brave) and (((Matching unit) is alive) Equal to True)) and ((Mana of (Matching unit)) Equal to 0.00)))
            Unit Group - Pick every unit in StarvingUnits and do (Actions)
                Loop - Actions
                    Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 5.00)
                    Set PingStarvingUnits = (Position of (Picked unit))
                    Cinematic - Ping minimap for (Player group((Owner of (Picked unit)))) at (Position of (Picked unit)) for 1.00 seconds, using a Flashy ping of color (100.00%, 0.00%, 0.00%)
                    Point - Remove PingStarvingUnits
            Unit Group - Destroy unit group StarvingUnits
            Custom script: set udg_StarvingUnits = null
     
     
  6. MP Productions©

    MP Productions©

    Joined:
    Jun 11, 2005
    Messages:
    19
    Resources:
    0
    Resources:
    0
    hmm.. it still doesnt help any more.. please someone help me..
    maybe i could give someone the map, so he can see in the triggers what's wrong?
    please send me an email if you want the map:
    maartenprinsen25@hotmail.com

    btw.. i NEVER protect my maps.. im against it
    but, i used WEU for this map, so you cant open it with the normal WE

    please help as fast as possible!
    any help is appreciated!!

    ~MP Productions©