SA-MP Forums Archive
26 errors - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: 26 errors (/showthread.php?tid=193462)



26 errors - armyoftwo - 26.11.2010

Код:
stock SavePlayerVehicle(vehid)
{
    format(string, sizeof(string), "UPDATE `vehicles` SET `vPos` = '%f', `vPos2` = '%f', `vPos3` = '%f', `vPos4` = '%f',  `Price` = '%i'", VehicleInfo[vehid][vPos][0], VehicleInfo[vehid][vPos][1], VehicleInfo[vehid][vPos][2], VehicleInfo[vehid][vPos][3], VehicleInfo[vehid][vprice], VehicleInfo[vehid][vrent], VehicleInfo[vehid][vbuyable], VehicleInfo[vehid][vfaction]{VehicleInfo[vehid][vPos][0], VehicleInfo[vehid][vPos][1], VehicleInfo[vehid][vPos][2], VehicleInfo[vehid][vPos][3], VehicleInfo[vehid][vprice]);
    format(string, sizeof(string), "%s, `Gang` = '%i', `job` = '%i', `Fuel` = '%i', `Model` = '%i', `Owner` = '%i', `Lock` = '%i', `Mod1` = '%i', `Rent` = '%i', `Buyable` = '%i', `Faction` = '%i'", string,  VehicleInfo[vehid][vgang], VehicleInfo[vehid][vjob], VehicleInfo[vehid][Fuel], VehicleInfo[vehid][vModel], VehicleInfo[vehid][vOwner], VehicleInfo[vehid][vLock], VehicleInfo[vehid][vMod][0],VehicleInfo[vehid][vrent], VehicleInfo[vehid][vbuyable], VehicleInfo[vehid][vfaction]);
    format(string, sizeof(string), "%s, `Mod2` = '%i',`Mod3` = '%i',`Mod4` = '%i',`Mod5` = '%i',`Mod6` = '%i',`Mod7` = '%i',`Mod8` = '%i',`Mod9` = '%i',`Mod10` = '%i' WHERE `SQLID` = '%d'", string,  	VehicleInfo[vehid][vMod][1],VehicleInfo[vehid][vMod][2],VehicleInfo[vehid][vMod][3],VehicleInfo[vehid][vMod][4],VehicleInfo[vehid][vMod][5],VehicleInfo[vehid][vMod][6],VehicleInfo[vehid][vMod][7],VehicleInfo[vehid][vMod][8], VehicleInfo[vehid][vMod][9] );
    format(string, sizeof(string), "%s, `Mod11` = '%i' ,`Mod12` = '%i' ,`Mod13` = '%i' ,`Mod14` = '%i' ,`Mod15` = '%i' ,`Mod16` = '%i',`Mod17` = '%i' WHERE `SQLID` = '%d'",string,VehicleInfo[vehid][vMod][10],VehicleInfo[vehid][vMod][11],VehicleInfo[vehid][vMod][12],VehicleInfo[vehid][vMod][13],VehicleInfo[vehid][vMod][14],VehicleInfo[vehid][vMod][15],VehicleInfo[vehid][vMod][16], VehicleInfo[vehid][vSQLID] );
    mysql_query(string);
}



Respuesta: 26 errors - OwlCity - 26.11.2010

So. .. writes some errors to know that we have to look.


Re: Respuesta: 26 errors - armyoftwo - 26.11.2010

Quote:
Originally Posted by OwlCity
Посмотреть сообщение
So. .. writes some errors to know that we have to look.
You even know what's 26 errors? I have no bracket missing etc..
When i comment this stock it wont show those 26 errors anymore, so theres something with this code


Respuesta: 26 errors - OwlCity - 26.11.2010

To start, with this code the only thing that works is:
pawn Код:
format(string, sizeof(string), "%s, `Mod11` = '%i' ,`Mod12` = '%i' ,`Mod13` = '%i' ,`Mod14` = '%i' ,`Mod15` = '%i' ,`Mod16` = '%i',`Mod17` = '%i' WHERE `SQLID` = '%d'",string,VehicleInfo[vehid][vMod][10],VehicleInfo[vehid][vMod][11],VehicleInfo[vehid][vMod][12],VehicleInfo[vehid][vMod][13],VehicleInfo[vehid][vMod][14],VehicleInfo[vehid][vMod][15],VehicleInfo[vehid][vMod][16], VehicleInfo[vehid][vSQLID] );
Because you're saving various strings in the same data.


Re: Respuesta: 26 errors - armyoftwo - 26.11.2010

Quote:
Originally Posted by OwlCity
Посмотреть сообщение
To start, with this code the only thing that works is:
pawn Код:
format(string, sizeof(string), "%s, `Mod11` = '%i' ,`Mod12` = '%i' ,`Mod13` = '%i' ,`Mod14` = '%i' ,`Mod15` = '%i' ,`Mod16` = '%i',`Mod17` = '%i' WHERE `SQLID` = '%d'",string,VehicleInfo[vehid][vMod][10],VehicleInfo[vehid][vMod][11],VehicleInfo[vehid][vMod][12],VehicleInfo[vehid][vMod][13],VehicleInfo[vehid][vMod][14],VehicleInfo[vehid][vMod][15],VehicleInfo[vehid][vMod][16], VehicleInfo[vehid][vSQLID] );
Because you're saving various strings in the same data.
you're totally wrong, you even know what i am trying to do here? If i put all that in one line it will show - input line too long error


Re: 26 errors - MadeMan - 26.11.2010

Show the errors.


Re: Respuesta: 26 errors - armyoftwo - 26.11.2010

Quote:
Originally Posted by armyoftwo
Посмотреть сообщение
You even know what's 26 errors? I have no bracket missing etc..
When i comment this stock it wont show those 26 errors anymore, so theres something with this code
...............
if you don't know what means 26 errors, it means that it shows that all your SCRIPT stocks and etc. Like it doesn't exist.
Usually this happens when you miss a bracket somewhere but i don't miss any brackets here