mIRC Home    About    Download    Register    News    Help

Print Thread
#138250 27/12/05 02:17 AM
Joined: Oct 2005
Posts: 75
C
Babel fish
OP Offline
Babel fish
C
Joined: Oct 2005
Posts: 75
i have this

Code:
on *:text:lick *:#:{
  if ($level($nick)) == 666) { $read $mircdir\TXT\lick.txt 
  }
  else msg $chan $ddrain( [ $rand(1,8) ] lick jo0'reself $nick i'm busy))
}


but when ever i try to do lick nick it give me this
18:10| ·ø· Invalid command: == any idea why?

#138251 27/12/05 03:21 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
You've got an extra closed bracket )

#138252 27/12/05 03:27 AM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
$read is an identifier that returns a result, so unless that result is a command, you cannot put $read as first parameter to be executed. You need to pass the result to a command.

Example for you: msg #channel $read(...)

Your usage of $read is wrong anyway, take a look in the help file at /help $read.

As RusselB pointed out you have one too many brackets in the $level($nick)) part, and in the $ddrain( [ $rand(1,8) ] lick jo0'reself $nick i'm busy)) part. Even though it doesn't matter in the second case (you can put as many closing brackets as you want at the end, it's not what you call good coding practice.

Btw there's no reason to put those evaluation brackets around the $rand, mIRC will process it correctly.


Just so you would understand why exactly it gave you that error:

if (condition) command

if ($level($nick)) == 666) { $read ...


This is something you could have find out yourself by looking at the error message, then looking at the code, and thinking logically.


Gone.

Link Copied to Clipboard