on *:TEXT:!checkg:#: { var %c = 0 while ($read(Blacknickstotal.txt, %c) <= 21) && ($read(Blacknickstotal.txt, %c) > $read(totalscheck.txt, 1)) { /write -l1 totalscheck.txt $eval($read(Blacknickstotal.txt, %c)) inc %c } } In variables %c = 4, however it isn't writing the 4th to totalscheck.txt and changing the while to if doesn't work. Basically. It finds the correct line but doesn't write that line to totalscheck.txt could you re-write it so that it does write that line?