Read Random Line - What am I doing wrong? - 23/04/15 04:04 AM
Greeting Everyone,
I'm just starting to learn how to script in mIRC.
I ran across an issue where if I had more than 1 $read(file.txt,n) in a command, it would return the same random value. A simple example below:
on *:text:!select:# {
msg $chan $read(list.txt,n)
msg $chan $read(list.txt,n)
}
What I really want to do is set the variables to 2 seperate random values from list.txt. For example:
on *:text:!select:# {
set %var1 $read(list.txt,n)
set %var2 $read(list.txt,n)
}
Does anyone have a suggestion? I'm reading up on the wiki, but can't seem to come to a conclusive solution yet.
Any help is greatly appreciated! Thanks!
I'm just starting to learn how to script in mIRC.
I ran across an issue where if I had more than 1 $read(file.txt,n) in a command, it would return the same random value. A simple example below:
on *:text:!select:# {
msg $chan $read(list.txt,n)
msg $chan $read(list.txt,n)
}
What I really want to do is set the variables to 2 seperate random values from list.txt. For example:
on *:text:!select:# {
set %var1 $read(list.txt,n)
set %var2 $read(list.txt,n)
}
Does anyone have a suggestion? I'm reading up on the wiki, but can't seem to come to a conclusive solution yet.
Any help is greatly appreciated! Thanks!