Read next line in file
#7

There is currently no function to specify which lines to search by, but this may work.
PHP код:
stock readfile()
{
    new 
        
File:file fopen("file.txt"io_read),
        
string[128],
        
foundline 0;
    
    while(
fread(filestringsizeof(string)) {
        if((
strfind(string"#4") != -1) && !foundline) {
            
foundline 1;
            continue;
        }
        
        if(
foundline) {
            
printf("%s"string);
        }
    }
    return 
1;

Very impractical though.
Reply


Messages In This Thread
Read next line in file - by Skillet` - 08.10.2012, 14:33
Re: Read next line in file - by Kwarde - 08.10.2012, 19:25
Re: Read next line in file - by Riddick94 - 08.10.2012, 19:27
Re: Read next line in file - by Kwarde - 08.10.2012, 19:29
Re: Read next line in file - by Riddick94 - 08.10.2012, 19:31
Re: Read next line in file - by Kwarde - 08.10.2012, 19:33
Re: Read next line in file - by ReneG - 08.10.2012, 22:32
Re: Read next line in file - by Skillet` - 08.10.2012, 23:56
Re: Read next line in file - by ReneG - 09.10.2012, 01:06

Forum Jump:


Users browsing this thread: 4 Guest(s)