mIRC Home    About    Download    Register    News    Help

Print Thread
#88429 27/06/04 11:55 PM
Joined: Mar 2004
Posts: 359
L
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Mar 2004
Posts: 359
Code:
on *:TEXT:`say*:#: {
  if ($2- isin $read(file.txt) { msg # Hey $nick bug off! }
  else { msg # $2- }
}

The error is line 4, else, i'm sure it has to be elseif but i dont know how to work with that...
What the purpose of the script is for:
say if u have the word giant in the file, and if someone types `say hey your a giant
it would reply with Hey $nick bug off!
Please help.
Thanks in advance..

Last edited by LostServ; 27/06/04 11:56 PM.
#88430 28/06/04 12:39 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
if ($2- isin $read(file.txt) { msg # Hey $nick bug off! }

missing a parenthesis ;d

if ($2- isin $read(file.txt)) { msg # Hey $nick bug off! }

Then you also need to search the file, so for this we use w:

if ($read(file.txt, w, $+(*,$2-,*))) { msg # Hey $nick bug off! }

That will return the line that has $2- in it.

Last edited by KingTomato; 28/06/04 12:50 AM.

-KingTomato
#88431 28/06/04 12:54 AM
Joined: Mar 2004
Posts: 359
L
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Mar 2004
Posts: 359
Thanks, that did it smile


Link Copied to Clipboard