You posted incomplete code as there are a couple of ENDIFs and the LOOP missing.

Try this:
code:
IF Open(1,"c:\sync-c.log") = 0
$currentline = ReadLine(1)
WHILE @ERROR = 0
$lastline=$currentline
$currentline = ReadLine(1)
if instr($lastline,'sending') and instr($currentline,'failed send')
; failed to send
endif
LOOP
Close (1)
endif

_________________________
There are two types of vessels, submarines and targets.