31.08.2012, 15:24
When i use SaveDynamicCars(); Server stop and crash, but this code dont have errors
pawn Код:
public SaveDynamicCars()
{
new idx;
while (idx < sizeof(DynamicCars))
{
new SaveCars[256];
format(SaveCars,sizeof(SaveCars),"Sistema/Cars/All/%d.ini",idx);
dini_IntSet(SaveCars,"CarModel", DynamicCars[idx][CarModel]);
dini_FloatSet(SaveCars,"CarX", DynamicCars[idx][CarX]);
dini_FloatSet(SaveCars,"CarY", DynamicCars[idx][CarY]);
dini_FloatSet(SaveCars,"CarZ", DynamicCars[idx][CarZ]);
dini_FloatSet(SaveCars,"CarAngle", DynamicCars[idx][CarAngle]);
dini_IntSet(SaveCars,"CarColor1", DynamicCars[idx][CarColor1]);
dini_IntSet(SaveCars,"CarColor2", DynamicCars[idx][CarColor2]);
dini_IntSet(SaveCars,"FactionCar", DynamicCars[idx][FactionCar]);
dini_IntSet(SaveCars,"CarType", DynamicCars[idx][CarType]);
dini_IntSet(SaveCars,"cOwner", DynamicCars[idx][cOwner]);
dini_IntSet(SaveCars,"cValue", DynamicCars[idx][cValue]);
dini_IntSet(SaveCars,"cOwned", DynamicCars[idx][cOwned]);
dini_IntSet(SaveCars,"cLock", DynamicCars[idx][cLock]);
dini_IntSet(SaveCars,"cGold", DynamicCars[idx][cGold]);
dini_IntSet(SaveCars,"cFuel", DynamicCars[idx][cFuel]);
dini_FloatSet(SaveCars,"cHealth", DynamicCars[idx][cHealth]);
idx++;
}
return 1;
}