09.04.2009, 14:19
pawn Код:
new CarModelID = GetVehicleModel(GetPlayerVehicleID(t));
format(query,sizeof(query),"SELECT * FROM `Masinos` WHERE `CarModel` = `%i`", CarModelID);
samp_mysql_query(query);
samp_mysql_store_result()
samp_mysql_fetch_row(line);
new CarNeedStr[128], Float:x,Float:y,Float:z;
samp_mysql_get_field("CarLevel", str);
if(pInfo[t][Level] < strval(str)) {
GetPlayerPos(t,x,y,z);
format(CarNeedStr,128,"[SERVER]: Siai masinai reikalingas '%i' lygis!",strval(str));
SendClientMessage(t,lime,CarNeedStr);
SetPlayerPos(t,x,y,z+5); }
For now i have just 1 column in database, its:
CarName = Landstalker
CarLevel = 10
CarModel = 400
When I enter Landstalker server crashes with these messages:
pawn Код:
[17:14:26] Error in mysql_query: Unknown column '400' in 'where clause'
[17:14:26] Error in mysql_store_result: Unknown column '400' in 'where clause'