How to read specific line from a file?
#3

Quote:
Originally Posted by Jefff
Посмотреть сообщение
pawn Код:
new File:HouseFile = fopen(filename_here, io_read);
if(!HouseFile) return file bla bla doesnt exist
new string[128], unique, interior, Float:Pos[4], name[64];
while(fread(HouseFile, string))
{
    if(strval(string) == hinterior)
    {
        sscanf(string,"iia<f>[4]p<;>s[64]",unique, interior, Pos, name);
        break;
    }
}
fclose(HouseFile);
Thank you, but it will read whole file then, I need just one line, depending on ID you write in CMD "/createhouse ID" and that ID will navigate you to the line I want to read. (Unique ID)
Reply


Messages In This Thread
How to read specific line from INI file? - by Amel_PAtomAXx - 13.06.2014, 12:10
Re: How to read specific line from a file? - by Jefff - 13.06.2014, 12:19
Re: How to read specific line from a file? - by Amel_PAtomAXx - 13.06.2014, 12:30
Re: How to read specific line from a file? - by Threshold - 13.06.2014, 12:53
Re: How to read specific line from a file? - by Amel_PAtomAXx - 13.06.2014, 13:39
Re: How to read specific line from a file? - by Jefff - 13.06.2014, 14:27
Re: How to read specific line from a file? - by Amel_PAtomAXx - 13.06.2014, 14:36
Re: How to read specific line from a file? - by Amel_PAtomAXx - 13.06.2014, 16:01

Forum Jump:


Users browsing this thread: 1 Guest(s)