Saving Vehicles Help.
#4

Код:
SaveVehicles() 
{ 
    new filestring[125]; 
    new File: vfile = fopen("vehicles.txt", io_write); 
    if(!vfile) return printf("File did not open");
    for(new vehicleid = 1;vehicleid<MAX_VEH;vehicleid++) 
    { 
        if(cInfo[vehicleid][Car1Model] != 0) 
        { 
            format(filestring, sizeof(filestring), "%i,%f\n",cInfo[vehicleid][Car1Model],cInfo[vehicleid][CarX1]); 
            fwrite(vfile, filestring); 
        } 
    } 
    fclose(vfile); 
    return 1; 
}
Paste that and try again, then check the server's console. Is the message 'File did not open' showing there?
Reply


Messages In This Thread
Never Mind Removed - by astanalol - 10.03.2017, 09:13
Re: Saving Vehicles Help. - by Toroi - 10.03.2017, 09:27
Re: Saving Vehicles Help. - by astanalol - 10.03.2017, 10:06
Re: Saving Vehicles Help. - by Toroi - 10.03.2017, 10:12
Re: Saving Vehicles Help. - by astanalol - 10.03.2017, 10:23
Re: Saving Vehicles Help. - by Toroi - 10.03.2017, 10:25
Re: Saving Vehicles Help. - by astanalol - 10.03.2017, 14:28

Forum Jump:


Users browsing this thread: 2 Guest(s)