23.07.2010, 14:47
Hello everyone,
I am busy with a gamemode, with some mysql stuff in it, but I get some warnings when I place mysql_free_result on the places that I think are right.
Example:
Warnings:
Line 57 is the mysql_free_result, and line 58 is ofcourse the } sign.
So, is this a problem for the script? Or can I just ignore it? Can I remove it?
Thanks so far,
Bas
I am busy with a gamemode, with some mysql stuff in it, but I get some warnings when I place mysql_free_result on the places that I think are right.
Example:
pawn Код:
stock CheckAccount(username[])
{
format(query, sizeof(query), "SELECT id FROM players WHERE username='%s'", username);
mysql_query(query);
mysql_store_result();
if (mysql_num_rows() == 1)
{
return 1;
}
else
{
return 0;
}
mysql_free_result();
}
pawn Код:
C:\Users\User\Desktop\samp\gamemodes\****.pwn(57) : warning 225: unreachable code
C:\Users\User\Desktop\samp\gamemodes\****.pwn(58) : warning 209: function "CheckAccount" should return a value
So, is this a problem for the script? Or can I just ignore it? Can I remove it?
Thanks so far,
Bas