Hi there,
The following script appears to be working correctly, but variable 'num' doesn't appear to show the correct line the script actually stopped on in the file. For some reason %num is a randum number each time, even though the line it stops at in the file is the same/correct one, its as though the script is too quick and doesn't get chance to update %num each time?
on 1:TEXT:!test1:#:{
%var1 = textstring
%num = 1
:start
%var2 = $read("file.txt), %num)
%var3 = $gettok(%var2,1,58)
if (%var1 == %var3) {
goto end
}
else {
%num = %num + 1
goto start
}
:end
msg $chan %num
}
Any help please?
Thanks
Ninko