23.10.2009, 15:47
Hi Again!
I'm using modified GF and I have there some file functions problem.
Here it is:
I have problem with Vehicle Saving... When Vehicle Loads from file vehicle.cfg it looks like that:
Here is all ok.
But when vehicle are saving files looks like that:
Don't know what to do.... Here is my SaveCars()
In the script it looks normally...
So.. Who can help me?
Best Regrads, McSquizzy
I'm using modified GF and I have there some file functions problem.
Here it is:
I have problem with Vehicle Saving... When Vehicle Loads from file vehicle.cfg it looks like that:
Код:
598|2273.000000|2443.000000|9.000000|181.000000|2273.000000|2443.000000|9.000000|181.000000|-1|-1|60000|0|The State|None|LV999USA|0|0|1|0|25000|0|0|0|0|LV Police Car 598|2273.000000|2477.000000|9.000000|178.000000|2273.000000|2477.000000|9.000000|178.000000|-1|-1|60000|0|The State|None|LV999USA|0|0|1|0|25000|0|0|0|0|LV Police Car
But when vehicle are saving files looks like that:
Код:
598|2273.000000|2443.000000|9.000000|181.000000|2273.000000|2443.000000|9.000000|181.000000|-1|-1|60000|0|The State|None|LV999USA|0|0|1|0|25000|0|0|0|0|LV Police Car 598|2273.000000|2477.000000|9.000000|178.000000|2273.000000|2477.000000|9.000000|178.000000|-1|-1|60000|0|The State|None|LV999USA|0|0|1|0|25000|0|0|0|0|LV Police Car
Код:
public SaveCars() { new idx; new File: file2; while (idx < sizeof(CarInfo)) { new coordsstring[256]; format(coordsstring, sizeof(coordsstring), "%d|%f|%f|%f|%f|%f|%f|%f|%f|%d|%d|%d|%d|%s|%s|%s|%d|%d|%d|%d|%d|%d|%d|%d|%d|%s\r\n", // I tried with \r and without... same thing... CarInfo[idx][cId], CarInfo[idx][cCar_x], CarInfo[idx][cCar_y], CarInfo[idx][cCar_z], CarInfo[idx][cCar_a], CarInfo[idx][cVeh_X], CarInfo[idx][cVeh_Y], CarInfo[idx][cVeh_Z], CarInfo[idx][cVeh_A], CarInfo[idx][cColor1], CarInfo[idx][cColor2], CarInfo[idx][cTime], CarInfo[idx][cOwned], CarInfo[idx][cOwner], CarInfo[idx][cROwner], CarInfo[idx][cNumplate], CarInfo[idx][cTeh], CarInfo[idx][cLocked], CarInfo[idx][cKey], CarInfo[idx][cRent], CarInfo[idx][cCost], CarInfo[idx][cLock], CarInfo[idx][cAlarm], CarInfo[idx][cImmob], CarInfo[idx][cInsurance], CarInfo[idx][cDesc]); if(idx == 1) { file2 = fopen("vehicle.cfg", io_write); } else { file2 = fopen("vehicle.cfg", io_append); } fwrite(file2, coordsstring); idx++; fclose(file2); } return 1; }
So.. Who can help me?
Best Regrads, McSquizzy