03-29-2026, 03:04 PM
File.ReadContents() doesn't automatically put each line in an array element.
If you put a TextWindow.WriteLine(contenuto) after the ReadContents you see all the lines.
If there are no empty lines in the file you can do something like:
for i=1 to 999 ' ' if there are not more then 999 lines in the file
contenuto[i]=File.ReadLine(filepath,i)
if contenuto[i]="" then
i=1000
else
lunghezza=i
endif
endfor
If you put a TextWindow.WriteLine(contenuto) after the ReadContents you see all the lines.
If there are no empty lines in the file you can do something like:
for i=1 to 999 ' ' if there are not more then 999 lines in the file
contenuto[i]=File.ReadLine(filepath,i)
if contenuto[i]="" then
i=1000
else
lunghezza=i
endif
endfor


![[-]](https://litdev.uk/mybb/images/collapse.png)