View Single Post
  #29  
Old 08-16-2010, 04:18 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
Quote:
Originally Posted by WhiteDragon View Post
PHP Code:
function setTimer(temp.x) {
  if (
temp.<= 0) {
    return;
  }
  
cancelevents("Timeout");
  
scheduleevent(temp.x"Timeout"null);

And probably some other magic.

I never use timeouts because I like to pass state to the function via. scheduleevent instead of relying on this. variables like you need to in timeouts.
Corrected.

PHP Code:
function setTimer(temp.x) { 
  
cancelevents("Timeout"); 
  
  if (
temp.<= 0) { 
    return; 
  } 
  
scheduleevent(temp.x"Timeout"null); 

__________________
Reply With Quote