Here is the loop that fail:
Code: Select all
Local fh=OpenFile(nil, path .. filename$,#MODE_READ)
Local i=0
xmax=0
While i<size
l=Min(8192,size-i)
data$=ReadString(fh,l)
x=SendData(id,data$)
i=i+l
wend
CloseFile(fh)