1. Head to the 33rd Modeling Contest Poll and drink to your heart's desire.
    Dismiss Notice
  2. Choose your means of doom in the 17th Mini Mapping Contest Poll.
    Dismiss Notice
  3. A slave to two rhythms, the 22nd Terraining Contest is here.
    Dismiss Notice
  4. The heavens smile on the old faithful. The 16th Techtree Contest has begun.
    Dismiss Notice
  5. The die is cast - the 6th Melee Mapping Contest results have been announced. Onward to the Hive Cup!
    Dismiss Notice
  6. The glory of the 20th Icon Contest is yours for the taking!
    Dismiss Notice
  7. 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.

Some questions about leaks/lags and control lost

Discussion in 'World Editor Help Zone' started by Narg666, Sep 5, 2010.

  1. Narg666

    Narg666

    Joined:
    Aug 30, 2009
    Messages:
    112
    Resources:
    0
    Resources:
    0
    Well... I have some questions to do...

    Leaks:

    Integer, Real or Unit LOCAL variable leak? How to fix?
    Floating Text leaks even if you set lifetime? How to fix without destroying it instantly
    Moving a dummy unit every 0.03 seconds through local variables leaks? Even if I've destroyed it?
    Wich hidden things leaks? I know a lot, but my map still have lag. And I don't have a lot of units or effects into it.


    Lags:

    Wich things can cause in-game lag? I did pré-loads, I cleaned every leak I know, and even I get a lot of lag while playing ONLINE only, but is not the host, I'm sure!

    Control Lost:

    I'm in trouble with players online, because they usually loose the control over their heroes... I don't know what is causing it, I GUESS it is caused by the 0.03 seconds spells, but I'm not sure! I really need help, really.

    Here is my map for you to take a look.
    http://epicwar.com/maps/147455/

    I will give the unprotected map only for people who I have seen before in other help posts of Hive.

    I know a lot about JASS, I'm learning vJASS now, but I didn't have used it in this map yet.
     
  2. Assassins-Creed

    Assassins-Creed

    Joined:
    Aug 6, 2009
    Messages:
    663
    Resources:
    1
    Maps:
    1
    Resources:
    1
    I can also help alot about leaks (From your other thread)
     
  3. watermelon_1234

    watermelon_1234

    Joined:
    Nov 18, 2007
    Messages:
    1,066
    Resources:
    10
    Spells:
    9
    JASS:
    1
    Resources:
    10
    Integers and reals do no leak. Local unit variables leak so you must null them when you're done.

    Floating texttags don't leak as long as you also have
    Code (vJASS):
    call SetTextTagPermanent(YourTextTag,false)
     
  4. Narg666

    Narg666

    Joined:
    Aug 30, 2009
    Messages:
    112
    Resources:
    0
    Resources:
    0
    Unit no local variables leaks too?
     
  5. watermelon_1234

    watermelon_1234

    Joined:
    Nov 18, 2007
    Messages:
    1,066
    Resources:
    10
    Spells:
    9
    JASS:
    1
    Resources:
    10
    Basically:
    Code (vJASS):
    local unit u // This alone does not leak. You don't need to set it to null later.
    local unit u2 = CreateUnit(...) // This will leak if you don't null it.
    ...
    // Fixing leaks:
    set u2 = null
     
    You wouldn't need to do this:
    Code (vJASS):

    local integer i = 21321321321
    ...
    set i = 0 // No point because integers don't leak.
     
    In the case of globals, there's no need for them to be nulled since their value will most likely get overridden if they get used again.
     
  6. Narg666

    Narg666

    Joined:
    Aug 30, 2009
    Messages:
    112
    Resources:
    0
    Resources:
    0
    Well, if you play my map, you'll see that I know how to deal with Jass, but lag and control lost are screwing my map! I'm desperated! I really need help!

    Well, maybe it can be because I didn't fix some old leaks, I will do it now... thank you.
     
  7. Narg666

    Narg666

    Joined:
    Aug 30, 2009
    Messages:
    112
    Resources:
    0
    Resources:
    0
    Someone More?
     
  8. Narg666

    Narg666

    Joined:
    Aug 30, 2009
    Messages:
    112
    Resources:
    0
    Resources:
    0
    Someone Else?
     
  9. Narg666

    Narg666

    Joined:
    Aug 30, 2009
    Messages:
    112
    Resources:
    0
    Resources:
    0
  10. Pharaoh_

    Pharaoh_

    Joined:
    Nov 6, 2008
    Messages:
    8,128
    Resources:
    11
    Icons:
    3
    Skins:
    1
    Spells:
    6
    Tutorials:
    1
    Resources:
    11
    See, we can't guess what's wrong with your map. Send me the unprotected version to check it.
     
  11. defskull

    defskull

    Joined:
    Mar 27, 2008
    Messages:
    7,978
    Resources:
    17
    Spells:
    17
    Resources:
    17
    You want to clean the leaks in GUI ?
    This is how unit leaks are cleaned
    • Actions
      • Unit - Create 1 Unit for Player 1 (Red) at (Somewhere) facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_Somewhere)

    "Somewhere" is a variable, which will be cleaned by Custom Script

    Further Infos:
    call DestroyGroup(udg_<variable>) is for cleaning Unit Group leaks
    set bj_wantDestroyGroup = true, is for cleaning Unit Group leaks too
    call RemoveRect(udg_<variable>) is for cleaning Region leaks
    call DestroyForce is for... I forgot >.<
    • Special Effect - Destroy (Last created special effect)

    Creating a Special Effect leaks too, therefore it should be cleaned, but it can be cleaned by using non-custom script because it is already has its own user-friendly leaks cleaner