Raised This Month: $ Target: $400
 0% 

Sqlx Help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
rainin
Member
Join Date: Apr 2011
Location: Estonia
Old 09-23-2011 , 08:10   Re: Sqlx Help
Reply With Quote #6

PHP Code:
L 09/23/2011 16:07:41: [MySQLInvalid info tuple handle0
L 09
/23/2011 16:07:41: [AMXXDisplaying debug trace (plugin "dr.amxx")
L 09/23/2011 16:07:41: [AMXXRun time error 10native error (native "SQL_ThreadQuery")
L 09/23/2011 16:07:41: [AMXX]    [0dr.sma::Load_MySql (line 267)
L 09/23/2011 16:07:41: [AMXX]    [1dr.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"ErrcodeError);
    }
    else if(
FailState == TQUERY_QUERY_FAILED)
    {
        
log_amx("Load Query failed. [%d] %s"ErrcodeError);
    }

    new 
id;
    
id Data[0];
    
    
    if(
SQL_NumResults(Query) < 1
    {
         
//.if there are no results found
        
new szIp[32];
        
get_user_ip(idszIpcharsmax(szIp));
        new 
szPlayerName[32];
        
get_user_name(idszPlayerNamecharsmax(szPlayerName));
        new 
szSteamId[32];
        
get_user_authid(idszSteamIdcharsmax(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(Query1);
    }
    
    return 
PLUGIN_HANDLED;

717:
PHP Code:
public client_putinserverid )
{
    
Load_MySql(id);
    
g_bConnectedid ] = true;


Last edited by rainin; 09-23-2011 at 08:18.
rainin is offline
Send a message via MSN to rainin
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:43.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode