mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2016
Posts: 9
P
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Jun 2016
Posts: 9
Hey, I made a test script for some future commands and stuff but it doesn't really work...

Code:
on *:text:!trusted*:#:{
  if ($nick isin $read(Trusted, w, $nick)) {
    msg $chan $nick is trusted!
  }
  else {
    msg $chan $nick is not trusted!
  }
}


This is the script.
The problem is: even if the name of the user is in my textfile the bot says "NICKNAME is not trusted!".

Please help

Last edited by Psyqological; 26/06/16 12:18 AM.
Joined: May 2015
Posts: 249
Fjord artisan
Offline
Fjord artisan
Joined: May 2015
Posts: 249
$read(Trusted, w, $nick) may be you missed extention - Trusted.txt?


Dont give a fish - teach to fish!
Joined: May 2015
Posts: 249
Fjord artisan
Offline
Fjord artisan
Joined: May 2015
Posts: 249
And you can actually shorten "($nick isin $read(Trusted.txt,w,$nick))" to "($read(Trusted.txt,w,$nick))"


Dont give a fish - teach to fish!
Joined: Jun 2016
Posts: 9
P
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Jun 2016
Posts: 9
I created a variable called Trusted connected with the path to the textfile called trusted.txt. This textfile has all the names in it (each name on one line)

And thank you for the shortened version, good to know smile

Quote:
%Trusted E:\Bot\trusted.txt
is the variable


Last edited by Psyqological; 26/06/16 12:10 PM.
Joined: May 2015
Posts: 249
Fjord artisan
Offline
Fjord artisan
Joined: May 2015
Posts: 249
"$read(Trusted, w, $nick)" is not "$read(%Trusted, w, $nick)"


Dont give a fish - teach to fish!
Joined: Jun 2016
Posts: 9
P
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Jun 2016
Posts: 9
EDIT: Dissolved the problem!

Last edited by Psyqological; 26/06/16 06:41 PM.

Link Copied to Clipboard