Hello, who have problem with error "
[sbpp_main.smx] Query Failed: Query was empty" then, there is fix. The problem was in code at line 997.
I changed this code:
Code:
SQL_SetCharset(DB, "utf8");
at:
Code:
FormatEx(query, sizeof(query), "SET NAMES \"UTF8\"");
Edit - I find next problem with:
Code:
[SM] Exception reported: Invalid database Handle 0 (error: 4)
[SM] Blaming: sbpp_comms.smx
[SM] Call stack trace:
[SM] [0] SQL_TQuery
[SM] [1] Line 264, C:\....
Solution is here. I removed following code in sbpp_comms:
Code:
public OnMapEnd()
{
decl String:Query[2048];
Format(Query, sizeof(Query),
"UPDATE %s_comms \
SET RemovedBy = 0, \
RemoveType = 'E', \
RemovedOn = UNIX_TIMESTAMP() \
WHERE sid = %d \
AND RemovedOn IS NULL \
AND length = -1",
DatabasePrefix, serverID);
#if defined LOG_QUERIES
LogToFile(logQuery, "OnMapEnd for: %s. QUERY: %s", clientAuth, Query);
#endif
SQL_TQuery(g_hDatabase, Query_ErrorCheck, Query);
// Clean up on map end just so we can start a fresh connection when we need it later.
// Also it is necessary for using SQL_SetCharset
if (g_hDatabase)
CloseHandle(g_hDatabase);
g_hDatabase = INVALID_HANDLE;
}
and I changed the code to:
Code:
public OnMapEnd()
{
// Clean up on map end just so we can start a fresh connection when we need it later.
// Also it is necessary for using SQL_SetCharset
if (g_hDatabase)
CloseHandle(g_hDatabase);
g_hDatabase = INVALID_HANDLE;
}