mIRC Home    About    Download    Register    News    Help

Print Thread
#16513 23/03/03 04:08 AM
Joined: Dec 2002
Posts: 332
C
Cheech Offline OP
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
Code:
 
on *:join:*: {
  set %j $chan
  set %s $address($nick,2)
  set %s1 %s $+ : $+ $nick
  if ( %j == #channel ) && ( %s isin $read(blah.txt,w,%s) ) && ( %s isin $ialchan($nick,#channel,2) )  { set %s2 $readn + 1 | echo 4 #channel ***** %s1 has entered before as $read(blah.txt,%s2) }
  else { 
    write blah.txt %s | write blah.txt %s1
  }
}


i dont get any errors but the script doesnt work i have tryed alot of variations but still havent gotten it can you tell me whats wrong ? it writes fine but the rest doesnt work thx in advance

Joined: Dec 2002
Posts: 332
C
Cheech Offline OP
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
i figured it out thx wink

Joined: Dec 2002
Posts: 339
F
Fjord artisan
Offline
Fjord artisan
F
Joined: Dec 2002
Posts: 339
What was the problem?

Joined: Dec 2002
Posts: 332
C
Cheech Offline OP
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
Code:
 
on !*:join:*: {
  set %j $chan
  set %s $address($nick,2)
  set %s1 $right(%s,-4)
  set %s2 %s1 $+ : $+ 04 $+ $nick
  if ( %j == #channel ) && ( %s1 isin $read(blah.txt,w,%s1) ) { 
    set %s3 $readn + 1 
    echo #channel 04***** 12 %s2 01has entered before as 12 $read(blah.txt,%s3) 
    write -l $+ %s3 blah.txt %s2
    set %s4 $readn - 1
    write -l $+ %s4 blah.txt %s1
  }
  else { 
    if ( %j == #channel ) { write blah.txt %s1 | write blah.txt %s2 }
  }
}
 


it still has a few bugs but i am working them out smile i think my error is in the $rean - 1 bit i will let you know when it is worked out

Joined: Dec 2002
Posts: 332
C
Cheech Offline OP
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
Code:
on !*:join:*: {  
set %j $chan  
set %s $address($nick,2)  
set %s1 $right(%s,-4)  
set %s2 %s1 $+ : $+ 04 $+ $nick 
if ( %j == #channel ) && ( %s1 isin $read(blah.txt,w,%s1) {     
set %s3 $readn + 1     
echo #channel 04***** 12 %s2 01has entered before as 12 $read(blah.txt,%s3)     
write -l $+ %s3 blah.txt %s2   
set %s4 $readn     
write -l $+ %s4 blah.txt %s1  
}  
else {    
if ( %j == #channel ) { write blah.txt %s1 | write blah.txt %s2 }  
}
}


the $readn - 1 was incorrect and was writing to the wrong line it needed to be just $readn i also added a On Exit Event
Code:
  
on 1:EXIT: write -c blah.txt

that clears the file so it doesnt keep building up


Link Copied to Clipboard