Cout number of lines in file
#3

Hello,

There is my code:

Код:
						new Float:x, Float:y, Float:z;
						new count = 0;
						GetPlayerPos(playerid, x, y, z)
				        new File: file = fopen("cars.cfg", io_read);
						if (file)
							{
								while(fread(file, string))
								{
									count++;
								}
							//	fwrite(file, "%d,%d,%d,%d,%d,%d,%d,%s,%s,%d,,%d,%d);
								CreateVehicle(idveh, x+5, y, z, 82.2873, 0, 1, -1);
								format(string, 128, "\r\n %d,%d,%d,%d,82,1,1,Dealership,Test,5000,,0,0", idveh,x,y,z);
								fwrite(file, string);
								fclose(file);
							}
						else
						{
						    SendClientMessage(playerid,COLOR_RED,"Impossible d'ouvrir le fichier cars.cfg"); // not possible to open the file
						    return 1;
						}
But, nothing is written, normal?
Reply


Messages In This Thread
Cout number of lines in file - by jcvag44800 - 05.05.2014, 20:41
Re: Cout number of lines in file - by Konstantinos - 05.05.2014, 21:09
Re : Cout number of lines in file - by jcvag44800 - 05.05.2014, 21:21
Re: Cout number of lines in file - by Konstantinos - 06.05.2014, 09:37
Re : Cout number of lines in file - by jcvag44800 - 06.05.2014, 09:43
Re: Cout number of lines in file - by Konstantinos - 06.05.2014, 09:51
Re : Cout number of lines in file - by jcvag44800 - 06.05.2014, 10:40

Forum Jump:


Users browsing this thread: 1 Guest(s)