Search Unity

My first Infinite Loop!

Discussion in 'General Discussion' started by theinfomercial, Mar 21, 2009.

  1. theinfomercial

    theinfomercial

    Joined:
    Sep 9, 2008
    Posts:
    1,000
    Hello everybody. I've got great news! While I was working on one of my scripts I accidentally created:

    Code (csharp):
    1. while (i>=0)
    2. {
    3.     buttonActive = true;
    4. }
    Needless to say, when i=1 my script looped without a way of stopping and my button kept activating endlessly. My first Infinite Loop! I feel like a pro now! :D

    And yes, all the coding I've been doing has finally made my mind snap. Go me! :p