Property Update Problem
#1

pawn Код:
public OnPropUpdate()
{
    new idx;
    idx = 184;
    while (idx < sizeof(CarInfo))
    {
        new coordsstring[256];
        format(coordsstring, sizeof(coordsstring), "%d,%f,%f,%f,%f,%d,%d,%s,%s,%d,%s,%d,%d,%d,%d,%d,%d,%d,%d\n",
        CarInfo[idx][cIDcar],//
        CarInfo[idx][cLocationx],//
        CarInfo[idx][cLocationy],//
        CarInfo[idx][cLocationz],//
        CarInfo[idx][cAngle],//
        CarInfo[idx][cColor1],//
        CarInfo[idx][cColor2],//
        CarInfo[idx][cOwner],//
        CarInfo[idx][cModel],//
        CarInfo[idx][cPrice],//
        CarInfo[idx][cPlate],//
        CarInfo[idx][cOwned],//
        CarInfo[idx][cLock],//
        CarInfo[idx][cDestroyed],//
        CarInfo[idx][cInsurancecar],//
        CarInfo[idx][cInsurancemoto],
        CarInfo[idx][cInscarprice],//
        CarInfo[idx][cInsmotoprice],
        CarInfo[idx][cAudio]);//
        if(idx == 184)
        {
            file2 = fopen("Configs/cars.cfg", io_write);
        }
        else
        {
            file2 = fopen("Configs/cars.cfg", io_append);
        }
        fwrite(file2, coordsstring);
        idx++;
        fclose(file2);
    }
    return 1;
}
The server crashes when the callback is called. Can someone help me please?

Thanks in advance.
Reply
#2

Do you have the folder named 'Configs' in your scriptfiles ?
Reply
#3

Yes.. There are files in it too.
If it helps - the cars.ini file exists too, and has lines in it.

L.E: Problem solved! There was more data to be stored than the values defined.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)