mIRC Home    About    Download    Register    News    Help

Print Thread
#59224 05/11/03 07:41 AM
Joined: Sep 2003
Posts: 120
G
Gar Offline OP
Vogon poet
OP Offline
Vogon poet
G
Joined: Sep 2003
Posts: 120
I was given this code:

Code:
on *:action:*:#: {
    if (($1 == wonders) && ($2 == what) && ($4 == saying)) {
      describe # $read(sayings.txt,t)
  }
}


I was told to make a text file with the saying in it, one saying per line. I did. Put the sayins.txt file in the same folder as the script file was in.

Problem is....I can't get it to work. Does anyone know why?

#59225 05/11/03 07:46 AM
Joined: Dec 2002
Posts: 3,015
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,015
The file needs to be in mIRC's root directory, which is not necessarily the same folder you have the script in.

Make sure there aren't other on ACTION events that trigger above it in the same file, too.

#59226 05/11/03 08:00 AM
Joined: Sep 2003
Posts: 120
G
Gar Offline OP
Vogon poet
OP Offline
Vogon poet
G
Joined: Sep 2003
Posts: 120
thanks

#59227 05/11/03 02:41 PM
Joined: Jan 2003
Posts: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
If you go into mirc, and type //echo $mircdir, you want it in that directory.

#59228 05/11/03 04:30 PM
S
stimpy
stimpy
S
Hi Gar,

I'm the one that gave you the code...

You can also put the txt file in the same directory as the script...

You just need to change the following :

Code:
 on *:action:*:#: {    if (($1 == wonders) && ($2 == what) && ($4 == saying)) {      describe # $read( [color:red]Directory/sayings.txt[/color],t)  }} 


If the scripts is in this directory :
C:/mirc/scripts/yourscript.ini

Change the red part to :
scripts/sayings.txt

#59229 05/11/03 11:05 PM
Joined: Feb 2003
Posts: 806
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 806
Use $scriptdir for that.


Link Copied to Clipboard