AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Invalid info tuple handle: 2 (https://forums.alliedmods.net/showthread.php?t=162881)

dFF 07-24-2011 05:33

Invalid info tuple handle: 2
 
Here is my partial code:

PHP Code:

SaveStats()
{
    new 
szTemp256 ]    
    
    
formatexszTempcharsmaxszTemp ),
    
"UPDATE `%s` SET team1win=%d,team2win=%d WHERE `mapname`='%s'",
    
g_szDBg_iTeam1Winsg_iTeam2Winsg_szMapName )
    
    
SQL_ThreadQueryg_SqlTuple"IgnoreHandle"szTemp // error is here
    
    
set_task4.0"Task_FreeHandle" )
}

public 
Task_FreeHandle()
{
    if( 
g_SqlTuple != Empty_Handle )
    {
        
SQL_FreeHandleg_SqlTuple )
    }
    
    if( 
g_SqlConnection != Empty_Handle )
    {
        
SQL_FreeHandleg_SqlConnection )
    }
}

public 
IgnoreHandleFailStateHandle:QueryError[ ], ErrcodeData[ ], DataSize )
{
    if( 
Errcode )
        
log_amx"[Sql] Incorrect query. Error: (%d): %s"ErrcodeError )
        
    switch( 
FailState )
    {
        case 
TQUERY_CONNECT_FAILEDlog_amx"Failed to connect (%d): %s"ErrcodeError )
        case 
TQUERY_QUERY_FAILEDlog_amx"Query error (%d): %s"ErrcodeError )
    }
    
    
SQL_FreeHandleQuery )

    return 
PLUGIN_HANDLED


Map will change after 10-20 (or more) seconds after Task_FreeHandle will executed.

What is the problem ? Thanks.


All times are GMT -4. The time now is 01:02.

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