View Single Post
  #5  
Old 10-13-2011, 10:50 PM
Tolnaftate2004 Tolnaftate2004 is offline
penguin.
Join Date: Jul 2004
Location: Berkeley, CA
Posts: 534
Tolnaftate2004 is a jewel in the roughTolnaftate2004 is a jewel in the rough
Send a message via AIM to Tolnaftate2004
Quote:
Originally Posted by Stefan View Post
The thing is that waitfor() is working fine, ...
I actually uncovered this because waitfor exhibits this behavior.

e: The call stack is only severed at the call from script A to script B. The call stack is intact for any function calls within B.

What I have looks like this:

A
PHP Code:
//#CLIENTSIDE
function onCreated() {
  
thing = new TStaticVar();
  
thing.set = function () {
    if (
B.ask("Are you sure?")) {
      
fool_the_DCO 1;
    }
    echo(
"foo"); // never called
  
};
}

function 
onKeyPres$ed() {
  
thing.set();

$ inserted to get around the silly security.

B
PHP Code:
//#CLIENTSIDE
public function ask(text) {
  
temp.resp display(text,{"yes","no"});
  echo(
temp.resp); // echo just fine
  
return temp.resp// call stack severed, never returns
}

function 
display() {
  for (
temp.i=0temp.i<pagestemp.i++) {
    
// ask for player input
    
while (!waitfor(this.name,"onPlayerInput"));
    
temp.some_datum;
  }
  return 
temp.r// returns just fine

Or on Zenkou, pfatest: 432-6, SystemAlerts.
__________________
◕‿‿◕ pfa check yer syntax! src

Killa Be: when i got that locker in 6th grade the only thing in it was a picture of a midget useing a firehose :/

Last edited by Tolnaftate2004; 10-14-2011 at 12:15 AM..
Reply With Quote