The logic has to be there for things to work
"If this is !=" might work in a while script, but isnt common syntax
Plus it is beter to put the value of what you are testing against into a variable so mIRC doesn't have to recheck that value every time it goes through the loop.
on *:TEXT:!enemy:#: {
var %lines = 1
var %lines.total = $lines(enemy.txt)
while ( %lines <= %lines.total ) {
msg $chan 4 $+ $chr(35) $+ %lines $+ 12 $read(enemy.txt, %lines)
inc %lines
}
}
the logic is, that while the value in %lines is less than or equalt to the value in %lines.total, sort of the same as != but can (theoretically) leave you with %lines being a larger number than %lines.total leaving you with a runaway loop.
I hope the number of lines in that file is small because dumping them all out with a while loop like that can lead to flooding off very quiickly
you might try this instead:
on *:TEXT:!enemy:#: { .play -q1 $chan enemy.txt }