View Single Post
  #11  
Old 05-18-2012, 02:54 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Quote:
Originally Posted by greggiles View Post
OOh ok. Well I have one more question, is there necessarily anything wrong with the way I wrote it? (using multiple scheduleEvents)

Or is it just not reccomended to write it like that.?
Well, generally speaking, it's better to try to condense your code if you can. For example, if you have:
PHP Code:
function onCreated() {
this.chat 1;
sleep(1);
this.chat 2;
sleep(1);
this.chat 3;
sleep(1);
this.chat 4;
sleep(1);
this.chat 5;
sleep(1);
this.chat 6;
sleep(1);
this.chat 7;
sleep(1);
this.chat 8;

It's better to condense it like:
PHP Code:
function onCreated() {
  for (
temp.1temp.<= 8temp.++) {
    
this.chat temp.i;
    
sleep(1);
  }

__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote