Raised This Month: $51 Target: $400
 12% 

[MySQL] Invalid info tuple handle: 0


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Garrey
Member
Join Date: Jan 2010
Old 05-05-2012 , 09:51   [MySQL] Invalid info tuple handle: 0
Reply With Quote #1

Hi all modders,
i have the following error in my logs.

PHP Code:
L 05/05/2012 15:21:40: [MySQLInvalid info tuple handle0
L 05
/05/2012 15:21:40: [AMXXDisplaying debug trace (plugin "amxbans.amxx")
L 05/05/2012 15:21:40: [AMXXRun time error 10native error (native "SQL_ThreadQuery")
L 05/05/2012 15:21:40: [AMXX]    [0amxbans.sma::check_player (line 428
How could I remove this? If the line 428 contains this:
PHP Code:
public check_player(id)
{
    new 
player_steamid[32], player_ip[20];
    
get_user_authid(idplayer_steamid31);
    
get_user_ip(idplayer_ip191);

    new 
query[4096];
    new 
data[1];
    new 
pos 0;
    
pos += format(query[pos], 4095"SELECT bid,ban_created,ban_length,ban_reason,admin_nick,admin_id,admin_ip,player_nick,player_id,player_ip,server_name,server_ip,ban_type,unban_created FROM %s WHERE `unban_created` = 0 AND (`ban_length` = 0 OR `ban_created`+`ban_length`*60>UNIX_TIMESTAMP())",tbl_bans); // error 075: input line too long (after substitutions)
    
pos += format(query[pos], 4095" AND (`player_ip` = '%s' or (`player_id`='%s' AND `player_id` != '' AND `player_id` != 'HLTV' AND `player_id` != 'STEAM_ID_LAN' AND `player_id` != 'VALVE_ID_LAN' AND `player_id` != 'VALVE_ID_PENDING' AND `player_id` != 'STEAM_ID_PENDING')) ORDER BY `ban_created` DESC LIMIT 1;"player_ipplayer_steamid); // aha, ir pienaacis 2011.gads un ir izgudrots WHERE nosaciijums :)) /eternity_/
    
if (get_pcvar_num(amxbans_debug) == 1log_amx(query);
    
data[0] = id;
    
    
SQL_ThreadQuery(g_SqlX"check_player_"querydata1)
    
    return 
PLUGIN_HANDLED

Debug shows this stuff in logs:
PHP Code:
L 05/05/2012 16:46:33: [amxbans.amxxSELECT bid,ban_created,ban_length,ban_reason,admin_nick,admin_id,admin_ip,player_nick,player_id,player_ip,server_name,server_ip,ban_type,unban_created FROM amx_bans WHERE `unban_created` = AND (`ban_length` = OR `ban_created`+`ban_length`*60>UNIX_TIMESTAMP()) AND (`player_ip` = '194.28.205.123' or (`player_id`='STEAM_0:0:889908969' AND `player_id` != '' AND `player_id` != 'HLTV' AND `player_id` != 'STEAM_ID_LAN' AND `player_id` != 'VALVE_ID_LAN' AND `player_id` != 'VALVE_ID_PENDING' AND `player_id` != 'STEAM_ID_PENDING')) ORDER BY `ban_createdDESC LIMIT 1;
L 05/05/2012 16:46:46: [amxbans.amxxSELECT bid,ban_created,ban_length,ban_reason,admin_nick,admin_id,admin_ip,player_nick,player_id,player_ip,server_name,server_ip,ban_type,unban_created FROM amx_bans WHERE `unban_created` = AND (`ban_length` = OR `ban_created`+`ban_length`*60>UNIX_TIMESTAMP()) AND (`player_ip` = '194.166.189.81' or (`player_id`='STEAM_0:1:44017955' AND `player_id` != '' AND `player_id` != 'HLTV' AND `player_id` != 'STEAM_ID_LAN' AND `player_id` != 'VALVE_ID_LAN' AND `player_id` != 'VALVE_ID_PENDING' AND `player_id` != 'STEAM_ID_PENDING')) ORDER BY `ban_createdDESC LIMIT 1
Any suggestions?
__________________
People are like music, some speak the truth and others are just noise..

Last edited by Garrey; 05-05-2012 at 09:53.
Garrey is offline
Garrey
Member
Join Date: Jan 2010
Old 05-07-2012 , 07:03   Re: [MySQL] Invalid info tuple handle: 0
Reply With Quote #2

Forgot to add this check_player_
PHP Code:

public check_player_(failstateHandle:queryerror[], errnumdata[], size)
{
    new 
id data[0]

    if (
failstate) {
        new 
szQuery[256]
        
MySqlX_ThreadErrorszQueryerrorerrnumfailstate17 )
    }
    else {
    
        if(!
SQL_NumResults(query))
            return 
PLUGIN_HANDLED

        
new ban_length[50], ban_reason[255], admin_nick[100],admin_steamid[50],admin_ip[30],ban_type[4]
        new 
player_nick[50],player_steamid[50],player_ip[30],server_name[100],server_ip[30]
        
        new 
bid SQL_ReadResult(query0)
        new 
ban_created SQL_ReadResult(query1)
        
SQL_ReadResult(query2ban_length49)
        
SQL_ReadResult(query3ban_reason254)
        
SQL_ReadResult(query4admin_nick99)
        
SQL_ReadResult(query5admin_steamid49)
        
SQL_ReadResult(query6admin_ip29)
        
SQL_ReadResult(query7player_nick49)
        
SQL_ReadResult(query8player_steamid49)
        
SQL_ReadResult(query9player_ip29)
        
SQL_ReadResult(query10server_name99)
        
SQL_ReadResult(query11server_ip29)
        
SQL_ReadResult(query12ban_type3)

        
        if ( 
get_pcvar_num(amxbans_debug) == )
                
log_amx("^nbid: %d ^nwhen: %d ^nlenght: %s ^nreason: %s ^nadmin: %s ^nadminsteamID: %s ^nPlayername %s ^nserver: %s ^nserverip: %s ^nbantype: %s",bid,ban_created,ban_length,ban_reason,admin_nick,admin_steamid,player_nick,server_name,server_ip,ban_type)

        new 
current_time_int get_systime(0)
        new 
ban_length_int str_to_num(ban_length) * 60 // in secs

        
new complain_url[256]
        
get_pcvar_string(complainurl ,complain_url,255)
        
        
client_cmd(id"echo ^"[ViP.EE] ===============================================^"")
        
        new 
show_activity get_cvar_num("amx_show_activity")
        
        if(
get_user_flags(id)&ADMIN_LEVEL_F || id == 0)
            
show_activity 1;
            
        
show_activity 2//eternity_
        
        
if (show_activity == 2) {
            
client_cmd(id"echo ^"[ViP.EE] %L^"",LANG_PLAYER,"MSG_8"admin_nick)
        } else if (
show_activity == 1) {
            
client_cmd(id"echo ^"[ViP.EE] %L^"",LANG_PLAYER,"MSG_9")
        }
        
        
// Permanent ban
        
if (ban_length_int==0) {
            
client_cmd(id"echo ^"[ViP.EE] %L^"",LANG_PLAYER,"MSG_10")
        }
        
        
// Skaitam kad beigsies
        
else {
            new 
cTimeLength[128]
            new 
iSecondsLeft = (ban_created ban_length_int current_time_int)
            
get_time_length(idiSecondsLefttimeunit_secondscTimeLength127)
            
client_cmd(id"echo ^"[ViP.EE] %L^"" ,LANG_PLAYER"MSG_12"cTimeLength)
        }
        
        
// Iemesls, niks
        
client_cmd(id"echo ^"[ViP.EE] %L^""LANG_PLAYER"MSG_2"ban_reason)
        
client_cmd(id"echo ^"[ViP.EE] %L^""LANG_PLAYER"MSG_13"player_nick)
        
        new 
showipshowsteam;
        new 
ip[32], authid[32];
        
get_user_ip(id,ip,31,1);
        
get_user_authid(id,authid,31);
        
        if (
equal(ipplayer_ip)) showip true;
        else 
showip false;
        
        if (
equal(authidplayer_steamid)) showsteam true;
        else 
showsteam false;
        
        if ( 
equal("4294967295"player_steamid)
            || 
equal("HLTV"player_steamid)
            || 
equal("STEAM_ID_LAN",player_steamid)
            || 
equal("VALVE_ID_LAN",player_steamid)
            || 
equal("VALVE_ID_PENDING",player_steamid)
            || 
equal("STEAM_ID_PENDING",player_steamid)) {
            
showsteam false;
        }
            
        if (
showip && showsteam)
            
client_cmd(id"echo ^"[ViP.EE] %L^""LANG_PLAYER"MSG_14"player_ipplayer_steamid)
        else if (
showip)
            
client_cmd(id"echo ^"[ViP.EE] %L^""LANG_PLAYER"MSG_5"player_ip)
        else if (
showsteam)
            
client_cmd(id"echo ^"[ViP.EE] %L^""LANG_PLAYER"MSG_4"player_steamid)
        
    
//    client_cmd(id, "echo ^"[ViP.EE] %L^"", LANG_PLAYER, "MSG_5", player_ip)
    //    client_cmd(id, "echo ^"[ViP.EE] %L^"", LANG_PLAYER, "MSG_4", player_steamid)
    //    client_cmd(id, "echo ^"[ViP.EE] BanID: %d^"",  bid)
    //    client_cmd(id, "echo ^"[ViP.EE] %L^"", LANG_PLAYER, "MSG_7", complain_url)
        
client_cmd(id"echo ^"[ViP.EEMore infohttp://www.vip.ee/bans/%d^"", bid)
    //    client_cmd(id, "echo ^"[ViP.EE] ===============================================^"")
    //    client_cmd(id, "echo ^"[ViP.EE] UNBAN: Send SMS 'TXT VIP UNBAN %d' to number 1234 (Estonia, EEK 2.50)^"", bid)
        
client_cmd(id"developer 1;developer 0;disconnect;")
        
client_cmd(id"disconnect")


        if ( 
get_pcvar_num(amxbans_debug) == )
            
log_amx("[AMXBANS DEBUG] BID:<%d> Player:<%s> <%s> connected and got disconnected, because of an active ban"bidplayer_nickplayer_steamid)

        new 
id_str[3]
        
num_to_str(id,id_str,3)

        if (
is_user_connected(id)) {
            if ( 
get_pcvar_num(amxbans_debug) == )
                
log_amx("[AMXBANS DEBUG] still here. Kick-TASK ID1: <%d> ID2: <%s>"idid_str)
            
            
set_task(1.1,"delayed_kick",0,id_str,3); //fixed eternity
        
}

        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_HANDLED

__________________
People are like music, some speak the truth and others are just noise..
Garrey is offline
Old 05-12-2012, 08:30
Garrey
This message has been deleted by Exolent[jNr]. Reason: Don't bump until 2 weeks have passed since last post.
Reply



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 10:44.


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