16.05.2011, 09:45
awesome! good job zh3r0 !
#if UPDATE_TOP_ALWAYS == true
new DBResult: R1;
format(Query, sizeof(Query), "SELECT `Key` FROM `Top` WHERE `Name` = \'%s\'", Name(Player));
R1 = DB::Query(_DB, Query);
if(R1)
{
if(DB::Valid(R1))
{
DB::Free(R1);
format(Query, sizeof(Query), "UPDATE `Top` SET `Kills` = \'%d\', `Ratio` = \'%.3f\' WHERE `Name` = \'%s\'", inputtext[0], (Float:P_DATA[Player][Kills] / Float:P_DATA[Player][Deaths]), Name(Player));
DB::Query(_DB, Query);
}
else
{
DB::Free(R1);
format(Query, sizeof(Query), "INSERT INTO `Top` (`Name`, `Deaths`,`Ratio`) VALUES(\'%s\',\'%d\',\'%.3f\')",Name(Player), inputtext[0], (Float:P_DATA[Player][Kills] / Float:P_DATA[Player][Deaths]));
DB::Query(_DB, Query);
}
}
#endif
Indeed it is! How you noticed? :O
@ OBSERVADOR I found what the problem was. I was using an %s without any data. I will release another version with the bug fixes, but still if you want to solve it, do it yourself. Replace all the code inside #if UPDATE_TOP_ALWAYS == true with this: pawn Code:
Lines: 7931 - 7984 |
Indeed it is! How you noticed? :O
@ OBSERVADOR I found what the problem was. I was using an %s without any data. I will release another version with the bug fixes, but still if you want to solve it, do it yourself. Replace all the code inside #if UPDATE_TOP_ALWAYS == true with this: pawn Code:
Lines: 7931 - 7984 |