Read and Writer txt files - 25/08/04 02:20 PM
Hello all, i'm newbie
i'm writing auto answering quiz scripts.
I made Q & A txt files.
i used $read in my script to read Q in txt files.
then i wanna type the answer.
How can i know the answer line number?
something likes that (currency.txt) including couples of lines.
**************************************************
Afghanistan
afghani
**************************************************
in my script
*********
on *:TEXT:*:#quiz:{
if ($regex($1-,/(geography && currency)/i)) {
if ($regex($10-,/($read(currency.txt, w, *, 1))/i)) {
msg $play - $+ %line currency.txt
}
}
}
in there i don't know how to define veriable %line no.
i'm writing auto answering quiz scripts.
I made Q & A txt files.
i used $read in my script to read Q in txt files.
then i wanna type the answer.
How can i know the answer line number?
something likes that (currency.txt) including couples of lines.
**************************************************
Afghanistan
afghani
**************************************************
in my script
*********
on *:TEXT:*:#quiz:{
if ($regex($1-,/(geography && currency)/i)) {
if ($regex($10-,/($read(currency.txt, w, *, 1))/i)) {
msg $play - $+ %line currency.txt
}
}
}
in there i don't know how to define veriable %line no.