MySQL not saving data.(somewheres a mistake)
#7

The thing is its in Latvian language.
I will try to explain every thing.

This sets the info into MySQL database:

PHP код:
stock SetCarsStr(idxstolb[], znach[])
{
    new 
Query[128];
    
format(Querysizeof(Query), "UPDATE "TABLE_CARS" SET  %s = '%s' WHERE id = '%d' LIMIT 1"stolbznachidx);
    return 
mysql_query(Query);

This is where the Pvar CREVEH is made:
PHP код:
stock LoadMyCar(playerid)
{
    if(
GetPlayerHouse(playerid) == 0) return 1;
    if(
GetPlayerCar(playerid) == 0) return 1;
     new 
GetPVarInt(playerid"PlayerCars");
    new 
carid CreateVehicle(CarInfo[c][cModel], CarInfo[c][cX], CarInfo[c][cY], CarInfo[c][cZ], CarInfo[c][cFa], CarInfo[c][cColor][0], CarInfo[c][cColor][1], 90000);
     
CarDoors(caridCarInfo[c][cLock]);
     
Fuel[carid] = CarInfo[c][cFuel];
     
SetVehicleHealth(caridCarInfo[c][cHeal]);
    
Engine[carid] = false;
    
Lights[carid] = false;
    switch(
CarInfo[c][cLock])
    {
         case 
0IsLocked[carid] = false;
         case 
1IsLocked[carid] = true;
    }
    
SetPVarInt(playerid,"CREVEH",carid);
    if(
CarInfo[c][cVehcoms][0]!=0AddVehicleComponent(caridCarInfo[c][cVehcoms][0]);
    if(
CarInfo[c][cVehcoms][1]!=0AddVehicleComponent(caridCarInfo[c][cVehcoms][1]);
    if(
CarInfo[c][cVehcoms][2]!=0AddVehicleComponent(caridCarInfo[c][cVehcoms][2]);
    if(
CarInfo[c][cVehcoms][3]!=0AddVehicleComponent(caridCarInfo[c][cVehcoms][3]);
    if(
CarInfo[c][cVehcoms][4]!=0AddVehicleComponent(caridCarInfo[c][cVehcoms][4]);
    if(
CarInfo[c][cVehcoms][5]!=0AddVehicleComponent(caridCarInfo[c][cVehcoms][5]);
    if(
CarInfo[c][cVehcoms][6]!=0AddVehicleComponent(caridCarInfo[c][cVehcoms][6]);
    if(
CarInfo[c][cVehcoms][7]!=0AddVehicleComponent(caridCarInfo[c][cVehcoms][7]);
    if(
CarInfo[c][cVehcoms][8]!=0AddVehicleComponent(caridCarInfo[c][cVehcoms][8]);
    if(
CarInfo[c][cVehcoms][9]!=0AddVehicleComponent(caridCarInfo[c][cVehcoms][9]);
    if(
CarInfo[c][cVehcoms][10]!=0AddVehicleComponent(caridCarInfo[c][cVehcoms][10]);
    if(
CarInfo[c][cVehcoms][11]!=0AddVehicleComponent(caridCarInfo[c][cVehcoms][11]);
    if(
CarInfo[c][cVehcoms][12]!=0AddVehicleComponent(caridCarInfo[c][cVehcoms][12]);
    if(
CarInfo[c][cVehcoms][13]!=0AddVehicleComponent(carid,CarInfo[c][cVehcoms][13]);
    if(
CarInfo[c][cPaintjob]!=0ChangeVehiclePaintjob(caridCarInfo[c][cPaintjob]);
    return 
true;

the ccolors:
PHP код:
enum cInfo
{
    
id,
    
cModel,
    
Float:cX,
    
Float:cY,
    
Float:cZ,
    
Float:cFa,
    
Float:cHeal,
    
cFuel,
    
cColors[16],
    
cColor[2],
    
cOwner[MAX_PLAYER_NAME],
    
cLock,
    
cCost,
    
cVehcom[127],
    
cVehcoms[14],
    
cPaintjob
}; 
Ugh i guess there are tons of things to copy.
Heres the whole gamemode. If theres anything i need to translate or if theres anything in the script that you dont know what its ment for, il explain it. http://www.mediafire.com/view/sd6esp...d0/newmode.pwn
Reply


Messages In This Thread
MySQL not saving data.(somewheres a mistake) - by GuitarMan - 01.12.2014, 11:04
Re: MySQL not saving data.(somewheres a mistake) - by swiftyrus - 01.12.2014, 11:59
Re: MySQL not saving data.(somewheres a mistake) - by GuitarMan - 01.12.2014, 12:07
Re: MySQL not saving data.(somewheres a mistake) - by zT KiNgKoNg - 01.12.2014, 12:16
Re: MySQL not saving data.(somewheres a mistake) - by GuitarMan - 01.12.2014, 12:20
Re: MySQL not saving data.(somewheres a mistake) - by zT KiNgKoNg - 01.12.2014, 12:51
Re: MySQL not saving data.(somewheres a mistake) - by GuitarMan - 14.12.2014, 21:41

Forum Jump:


Users browsing this thread: 1 Guest(s)