SA-MP Forums Archive
vehicle system game changes column name! (mysql) - 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)
+--- Thread: vehicle system game changes column name! (mysql) (/showthread.php?tid=632782)



vehicle system game changes column name! (mysql) - grymtn - 19.04.2017

hello friends im trying to make a vehicle ownership system. I will give my code here but when i apply this code it funnily shows me error of unknown column name Chaves_Valles(this was supposed to be the person who buys not field) in mysql_log

My Code:
Код:
                        mysql_format(mysql, query, sizeof(query),
    			"INSERT INTO `Vehicles` (vehModel, vehOwner, vehPrice, vehName, vehPlate, vehColorOne, vehColorTwo, vehX, vehY, vehZ, vehA) VALUES (%d, %s, %d, '%e', '%e', %d, %d, %f, %f, %f, %f)",
    			GetVehicleModel(i), pname, vInfo[i][vehPrice], vInfo[i][vehName], vInfo[i][vehPlate], vInfo[i][vehColorOne], vInfo[i][vehColorTwo], vInfo[i][vehX],
    			vInfo[i][vehY], vInfo[i][vehZ], vInfo[i][vehA]);
    			mysql_query(mysql, query);



Re: vehicle system game changes column name! (mysql) - AndreiWow - 19.04.2017

I don't see any "Chaves_Valles" in there, can you show the line with the error...


Re: vehicle system game changes column name! (mysql) - Konstantinos - 19.04.2017

Strings need apostrophes around so "(%d, %s, %d..." becomes "(%d, '%s', %d..."