19.09.2014, 03:30
Hey guys, well im trying to save my racing times into the datbase, and so that it would communicate with a Dini through specific ID that the race has. Well, one of the Mysql functions that gets gets field information doesnt want to cooperate.
heres the code:
the error:
what could be the issue?
heres the code:
pawn Код:
if(BuildVehPosCount >= 2)
{
new query[300];
format(rFile, sizeof(rFile), "/rRaceSystem/%s.RRACE", BuildName);
mysql_format(mysql, query, sizeof(query), "INSERT INTO lenktynes (tipas, pavadinimas) VALUES(1, '%s')", BuildName);
mysql_tquery(mysql, query);
format(query,256, "SELECT id FROM lenktynes WHERE pavadinimas = '%s'", BuildName);
new Cache:result = mysql_query(mysql, query);
RaceID = cache_get_field_content_int(0, "id", mysql); //this one
cache_delete(result);
dini_IntSet(rFile, "rID", RaceID);
format(string, sizeof(string), "{FF3300} %i ", RaceID);
SendClientMessageToAll(-1, string);
BuildVehPosCount = 0;
BuildTakeVehPos = false;
ShowDialog(playerid, 605);
}
Код:
[21:17:33] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [21:17:33] [ERROR] cache_get_field_content_int - invalid datatype