Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 06:07 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.