Read from file.
#1

Hey, I want to take all the information from a file, and then to put it in a dialog,
but it will be in lines in the dialog.

How I save the words in the file.
Код:
format(string, sizeof(string), "CRecords/%s.cfg", playername);
new File:filee = fopen(string, io_append);
format(stringg, sizeof(stringg), "%s(%d/%d/%d)\r\n",inputtext, Day, Month,Year);
fwrite(filee, stringg);
fclose(filee);
How it looks in the file:
Код:
First(14/12/2010)
Second(14/12/2010)
And now I want to put it on a dialog:

How I tried to do that:
Код:
new File:filee = fopen(string, io_read);
new stringg[1300];
fread(filee, stringg);
format(string3, sizeof(string3), "Wanted for:\n%s", stringg);
ShowPlayerDialog(playerid,24,DIALOG_STYLE_MSGBOX,"POLICE DATABASE",string3,"Residence","Exit");
fclose(filee);
but it shows me onlt the first line and no all the lines. "First(14/12/2010)"

How can I do that ?
Reply


Messages In This Thread
Read from file. - by Gennum. - 15.12.2012, 15:03
Re: Read from file. - by Tanush123 - 15.12.2012, 15:49
Re: Read from file. - by Gennum. - 16.12.2012, 08:28

Forum Jump:


Users browsing this thread: 2 Guest(s)