strfind wont work.
#3

fread(fh, str); reads only 1\r\n - one line

pawn Код:
new File:fh = fopen("text.txt",io_read);
    new line;
    while(fread(fh, str))
    {
        ++line;
        if(strfind(str,"2",true) != -1)
        {
            printf("succeed at line %d",line);
            break; // stops the loop
        }
        else print("failed");
    }
    fclose(fh);
Reply


Messages In This Thread
strfind wont work. - by Equality - 08.08.2014, 04:24
Re: strfind wont work. - by Equality - 08.08.2014, 13:31
Re: strfind wont work. - by Jefff - 08.08.2014, 13:50
Re: strfind wont work. - by Equality - 08.08.2014, 15:58
Re: strfind wont work. - by Equality - 08.08.2014, 16:11
Re: strfind wont work. - by Jefff - 08.08.2014, 16:15
Re: strfind wont work. - by Equality - 08.08.2014, 16:24

Forum Jump:


Users browsing this thread: 3 Guest(s)