jaytea commented on a Page, Serve  -  Oct 07, 2011
else ($2 !ison #) && ($2 !== help) {
[ ... ]
Else ($3 !ison #) {

these two lines are incorrect, and will result in a '($2 Unknown command' and '($3 Unknown command' if those else cases are reached.

'else' doesn't take a condition, and you shouldn't need to include one if you use proper if / elseif branching logic above it. for example:

  if ($2 ison #) { }
  if ($2 == help) { }
  else { }

the 'else' here applies only to the second if ($2 == help). this is the logic you're aiming for:

if ($2 ison #) { }
else {
  if ($2 == help) { }
  else { }
}

which is equivalent to:

if ($2 ison #) { }
elseif ($2 == help) { }
else { }

take a look at /help /if because these are basic fundamentals

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.