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