View Single Post
  #27  
Old 02-07-2010, 08:31 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 Engine View Post
Is there any downfall to doing it that way?
Nope. I did it with continue because there was some more stuff down there and it gets messy with lots of indents. It's also good for stuff like:

PHP Code:
for (temp.pl players) {
  if (
pl.clientr.hp <= 0) {
    continue;
  }
  
  if (
pl == player) {
    continue;
  }
  
  if (
pl.onStaffTag()) {
    continue;
  }
  
  if (
pl.guild == player.guild && player.guild != "") {
    continue;
  }
  
  
pl.chat "oww!!!";

as opposed to

PHP Code:
for (temp.pl players) {
  if (
pl.clientr.hp && pl != player && ! pl.staffTag() && (pl.guild != player.guild && player.guild != "")) {
    
pl.chat "oww!!!";
  }

__________________
Reply With Quote