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.

Integer A does not bug

Discussion in 'Triggers & Scripts' started by Squiggy, Jul 17, 2009.

  1. Mooglefrooglian

    Mooglefrooglian

    Joined:
    Nov 28, 2008
    Messages:
    701
    Resources:
    0
    Resources:
    0
    So to summarize, it is cocded to run only one trigger at a time in a huge line. Any new trigger called will interrupt the first one, putting it to sleep until the new trigger is done or has its own wait. Waits are shoved to the back of the line depending on how long they have left.

    Is that how it works, or what?
     
  2. Deuterium

    Deuterium

    Joined:
    Mar 17, 2009
    Messages:
    1,301
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    So as a conclusion:

    DON'T USE Integer A/B
     
  3. Squiggy

    Squiggy

    Joined:
    Mar 25, 2008
    Messages:
    2,627
    Resources:
    18
    Maps:
    2
    Spells:
    15
    Tutorials:
    1
    Resources:
    18
    I was proving the exact opposite in my first post

    Unless you don't use nested loops and/or waits, you're fine
     
  4. baassee

    baassee

    Joined:
    Nov 14, 2008
    Messages:
    3,220
    Resources:
    17
    Spells:
    14
    Tutorials:
    3
    Resources:
    17
    I have to put in my word here:

    No one said that Integer A/B bugs ALL THE TIME when there loops are running at the same time.

    The chance is pretty low of my experience since I used it alot before.

    Squggy your example is not enough cause the same trigger copied is wrong, try many different triggers with different periodic events and other events that happens at the same time and you will see my point.

    Even thought I get your point with the loops. It takes less then nano seconds to execute these loops and the chance that they overlap should be LOW enough to be use able but if you have like 50 spells with periodics and only using int A and mostly casted all around the game it will prob bug.

    ~baassee
     
  5. PurplePoot

    PurplePoot

    Joined:
    Dec 14, 2005
    Messages:
    11,161
    Resources:
    3
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    It has nothing to do with chance and everything to do with competent coding.
     
  6. Deuterium

    Deuterium

    Joined:
    Mar 17, 2009
    Messages:
    1,301
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    But PP proved you wrong, so yeah nesting/wait doesn't matter anymore...
     
  7. PurplePoot

    PurplePoot

    Joined:
    Dec 14, 2005
    Messages:
    11,161
    Resources:
    3
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    Nested loops and waits are not the only ways to make it explode; see what I said about triggers that interrupt you.
     
  8. Anachron

    Anachron

    Joined:
    Sep 9, 2007
    Messages:
    6,220
    Resources:
    66
    Icons:
    49
    Packs:
    2
    Tools:
    1
    Maps:
    3
    Spells:
    9
    Tutorials:
    1
    JASS:
    1
    Resources:
    66
    GUI loops suck, but only while being combinied with waits, interrupts or other loops.