Solved reset a public int to 0

Discussion in 'Plugin Development' started by kamakarzy, May 7, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    kamakarzy

    hi im tryingto make this so after it reaches 108000 count it restarts at 0 any help please

    Code:
    private int count = 0;
     
                @Override
                public void run() {
                    if (count >= 108000) {
                        int count = 0;
                        return;
                    }
                    count++;
     
                }
     
            };
     
  2. Offline

    EcMiner

    Code:java
    1. private int count = 0;
    2.  
    3. @Override
    4. public void run() {
    5. if (count >= 108000) {
    6. count = 0;
    7. return;
    8. }
    9. count++;
    10.  
    11. }
    12.  
    13. };
     
  3. Offline

    kamakarzy

    thanks
     
  4. Offline

    EcMiner

    No problem :)
     
Thread Status:
Not open for further replies.

Share This Page