View Single Post
  #1  
Old 02-03-2012, 12:27 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Bug: The max loop limit can no longer be avoided serverside with a sleep.

In the past, this code would not have hit the max loop limit because of the sleep.

PHP Code:
function onCreated() {
  for (
temp.0temp.100000temp.++) {
    echo(
temp.i);
    
    if ((
temp.1) % this.maxlooplimit == 0) {
      echo(
"sleeping");
      
sleep(10);
    }
  }

Now, the loop limit is hit on the next iteration after the sleep, regardless of the length of the sleep; the result is the same with a 0.1 second sleep and a 10 second one.

Quote:
Originally Posted by RC Output
9996
9997
9998
9999
sleeping
Script: Loop limit exceeded at line 2 in script of TempLoopTest
This bug exists on at least Era Dev, Era, and Kingdoms Debug.
__________________
Reply With Quote