Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Rects or Regions leaks

Discussion in 'World Editor Help Zone' started by lelyanra, May 1, 2010.

  1. lelyanra

    lelyanra

    Joined:
    Sep 4, 2007
    Messages:
    380
    Resources:
    25
    Icons:
    25
    Resources:
    25
    what'da hell that "exitwhen(true)" is doing there?
     
  2. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    8,374
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    exitwhen true
    exits the loop immediately. I'm not sure if just writing exitwhen is enough, but the thing is it's often not the best idea to return out of a function so early, because you might skip over something (such as, in this case, the need to null the local unit).
     
  3. PurplePoot

    PurplePoot

    Joined:
    Dec 14, 2005
    Messages:
    11,161
    Resources:
    3
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    Conditionfuncs seem to be dealt with when you destroy the trigger, while actionfuncs do not. I don't think anybody knows why.