PHP Code:
L 09/23/2011 - 16:07:41: [MySQL] Invalid info tuple handle: 0
L 09/23/2011 - 16:07:41: [AMXX] Displaying debug trace (plugin "dr.amxx")
L 09/23/2011 - 16:07:41: [AMXX] Run time error 10: native error (native "SQL_ThreadQuery")
L 09/23/2011 - 16:07:41: [AMXX] [0] dr.sma::Load_MySql (line 267)
L 09/23/2011 - 16:07:41: [AMXX] [1] dr.sma::client_putinserver (line 717)
267:
PHP Code:
public register_client(FailState,Handle:Query,Error[],Errcode,Data[],DataSize)
{
if(FailState == TQUERY_CONNECT_FAILED)
{
log_amx("Load - Could not connect to SQL database. [%d] %s", Errcode, Error);
}
else if(FailState == TQUERY_QUERY_FAILED)
{
log_amx("Load Query failed. [%d] %s", Errcode, Error);
}
new id;
id = Data[0];
if(SQL_NumResults(Query) < 1)
{
//.if there are no results found
new szIp[32];
get_user_ip(id, szIp, charsmax(szIp));
new szPlayerName[32];
get_user_name(id, szPlayerName, charsmax(szPlayerName));
new szSteamId[32];
get_user_authid(id, szSteamId, charsmax(szSteamId)); // get user's steamid
// if its still pending we can't do anything with it
if (equal(szSteamId,"ID_PENDING"))
return PLUGIN_HANDLED;
new szTemp[512];
// now we will insturt the values into our table.
format(szTemp,charsmax(szTemp),"INSERT INTO `deathrun` (`nick` , `ip`, `steamid`, `elud`)VALUES ('%s','%s','%s','0');",szIp,szPlayerName,szSteamId);
SQL_ThreadQuery(g_SqlTuple,"IgnoreHandle",szTemp);
}
else
{
// if there are results found
g_Lifes[id] = SQL_ReadResult(Query, 1);
}
return PLUGIN_HANDLED;
}
717:
PHP Code:
public client_putinserver( id )
{
Load_MySql(id);
g_bConnected[ id ] = true;
}