View Single Post
  #9  
Old 08-26-2011, 11:44 PM
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
Don't do what you did:

PHP Code:
if (statement) if (otherstatement) {


Either do:

PHP Code:
if (statement) {
  if (
otherstatement) {

  }

or even (I prefer using two ifs though):

PHP Code:
if (statement && otherstatement) {


The above two are much more readable and will be easier to modify in the future. When you modify the code.

Also:

PHP Code:
function ChatBar.onAction() {  
  if (
ChatBar.text.trim() == "/flagadder") {  
    
OpenGui(); //Opens the GUI.
    
ChatBar.text ""// Clear the chatbar so /flagadder isn't chatted out loud.
  
}  

__________________
Quote:
Reply With Quote