[05:19:36] SQLitei Notice: (db_free_result_hook) Invalid result given.
[05:19:36] [debug] AMX backtrace:
[05:19:36] [debug] #0 native PrintBacktrace () from crashdetect.DLL
[05:19:36] [debug] #1 00019984 in ?? (0) from Survive.amx
[05:19:36] [debug] #2 00093a20 in ?? (0) from Survive.amx
[05:19:36] [debug] #3 000938e0 in ?? (0, 5235, 1, 0, 366666296) from Survive.amx
[05:19:36] [debug] #4 000110ec in public OnDialogResponse (0, 5235, 1, 0, 366666296) from Survive.amx
stock ApagarPlayerClan(playerid)
{
new Query[256], DBResult:Result;
format(Query, sizeof(Query), "DELETE FROM `ServerClan` WHERE `clanNome` = %s", GetPClan(playerid));
Result = db_query(gAccounts, Query);
return db_free_result(Result);
}
I'm guessing because the query doesn't contain any resulting information and doesn't need to be freed.
|
stock ApagarPlayerClan(playerid) { new Query[100]; format(Query, sizeof(Query), "DELETE FROM `ServerClan` WHERE `clanNome` = %s", GetPClan(playerid)); db_query(gAccounts, Query); }
Code:
stock ApagarPlayerClan(playerid) { new Query[100]; format(Query, sizeof(Query), "DELETE FROM `ServerClan` WHERE `clanNome` = %s", GetPClan(playerid)); db_query(gAccounts, Query); } |
stmt_apagarPlayerClan = db_prepare(gAccounts, "DELETE FROM 'ServerClan' WHERE 'clanNome'=? COLLATE NOCASE");
stock ApagarPlayerClan(playerid)
{
stmt_bind_value(stmt_apagarPlayerClan, 0, DB::TYPE_STRING, GetPClan(playerid));
stmt_execute(stmt_apagarPlayerClan);
}