Problem with ReadLine
BlitzPlus Forums/BlitzPlus Programming/Problem with ReadLine
| ||
anyone come accross the problem of a file only reading evry other line? loadingData = ReadFile(dirPath$) While ReadLine$(loadingData) <> "" e1.encrypt = New encrypt e1\rgb$ = ReadLine$(loadingData) e1\loc = count : count = count + 1 Wend CloseFile(loadingData) Tried using different commands, such as readstring, still get the same problem. Program appears to be reading lines 2,4,6,8,10 etc Nicoust |
| ||
You are using ReadLine$ in the While statement condition. That's eating every other line. Use a variable in the test that is loaded by the function.Line$ = ReadLine$(loadingData) While Line$<>"" e1.encrypt - New encrypt e1\rgb$ = Line$ e1\loc = count count = count + 1 Line$ = Readline$(loadingData) Wend |
| ||
Damn! Thx for that, I should have figured it out though:( |