Quote:
Originally Posted by Dr.G
thanks!
so something like:
PHP Code:
new line = 1 read_file ( const file[], line++, text[], len, &txtLen )
to get it to take the next line every time right?
|
This will read each individual line of a text file. Untested
PHP Code:
new szFile[] = "c:\originfile.txt"
new iNumLines = file_size ( szFile, 1 );
new iLineLen;
if( file_size(szFile,2 ) )
iNumLines--;
for( new iCurLine = 1; iCurLine<= iNumLines; iCurLine++)
{
new szReadBuffer[256];
read_file ( szFile, iCurLine, szReadBuffer, 255,iLineLen);
//szReadBuffer holds the line of text. You will need to split this up into 3 floats to go into your origin array.
}
__________________