Thread: Repeating chat?
View Single Post
  #2  
Old 06-07-2012, 04:37 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
You don't need an if statement, just use a timeout.

PHP Code:
function onCreated() {
  
onTimeout();
}

function 
onTimeout() {
  
this.chat "Message1";
  
sleep(3);
  
this.chat "Message2";
  
setTimer(3);

I'm pretty sure you've been told this before but use 2 equal signs instead of one when you're comparing values. I.e. if (this.variable == 1) { // stuff
__________________
Quote:
Reply With Quote