|
EDIT: solved, there was another method that was run in same time (which shouldnt be running) that caused this.
Note: I have simplified the method by removing extra stuff from it, but its basically like this:
Now lets input 250 to that method:Code:static int loopCount; public static void randomMethod(int count){ loopCount = 0; final int times = count/150; System.out.println(times); final Tick timer1 = new Tick(6) { @Override public void execute() { int count = loopCount; System.out.println(count); if(times == loopCount) this.stop(); loopCount++; } }; World.getTickManager().submit(timer1); }
^Because its skipping count = 1 it will continue forever... but how can it skip count=1?Code:1st print ("times") = 1 2nd print ("count") = 0 3rd print ("count") = 0 4th print ("count") = 2 5th print ("count") = 3 . . .
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |