Y_INI Saving vehicles problem
#1

I got problem with Y_INI while trying to save cars, each car - each file, by Vehicle ID. It saves a vehicles, but it won't stop doing it till I shut server down. It looks like this: I got 7 Cars in server and when I save cars, INI after saving these 7 continues saving to 8,9,10,11... till i shut down a srv.

pawn Код:
CMD:savecars(playerid, params[])
{
    #pragma unused params
    for(new i = 0; i < MAX_VEHICLES; i++)
    {
        SaveCars(i);

    }
    return 1;
}
pawn Код:
public SaveCars(vehicleid)
{
   
    new INI:File = INI_Open(CarPath(vehicleid));
    INI_SetTag(File,"|______Vehicle info______|");
    INI_WriteInt(File,"Model", GetVehicleModel(vehicleid));
        // And other things like pos, color, interior...
    INI_Close(File);

    return 1;
}
Reply
#2

DP :3

I fixed it...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)