AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   SQL_ThreadQuery error (https://forums.alliedmods.net/showthread.php?t=293386)

Airkish 01-30-2017 17:29

SQL_ThreadQuery error
 
Getting this error:
PHP Code:

L 01/31/2017 00:19:11: [MySQLInvalid info tuple handle0
L 01
/31/2017 00:19:11: [AMXXDisplaying debug trace (plugin "csgo2.amxx"version "unknown")
L 01/31/2017 00:19:11: [AMXXRun time error 10native error (native "SQL_ThreadQuery")
L 01/31/2017 00:19:11: [AMXX]    [0csgo2.sma::Registered (line 1869

Line 1869:
PHP Code:

SQL_ThreadQuery(g_hTuple"QuerySelectReg"szQueryiData1); 

Function:

PHP Code:

public Registered(id)
{
    if(!
is_user_connected(id) || is_user_bot(id))
        return;
    
    static 
szQuery[256], iData[1]; iData[0] = id;
    
formatex(szQuery255"SELECT * FROM `%s` WHERE `username` = '%s'"TABLE_NAMEget_user_name_ex(id));
    
SQL_ThreadQuery(g_hTuple"QuerySelectReg"szQueryiData1);
        
    
log_errors("[REGISTERED] %s"szQuery);


MySQL info is written correctly.

What's the problem?

Bugsy 01-30-2017 17:44

Re: SQL_ThreadQuery error
 
Need to see more code, specifically where g_hTuple gets its value.

Airkish 01-31-2017 05:59

Re: SQL_ThreadQuery error
 
Quote:

Originally Posted by Bugsy (Post 2491301)
Need to see more code, specifically where g_hTuple gets its value.

Sent you full code PM

Airkish 02-01-2017 08:05

Re: SQL_ThreadQuery error
 
Bugsy did u check?

Airkish 02-01-2017 15:51

Re: SQL_ThreadQuery error
 
Quote:

Originally Posted by Bugsy (Post 2491301)
Need to see more code, specifically where g_hTuple gets its value.

PHP Code:

g_hTuple SQL_MakeDbTuple(DB_HOSTDB_USERDB_PASSDB_DATA);
    
    new 
szTables[640]; format(szTables640"CREATE TABLE IF NOT EXISTS `%s` (`username` varchar(64) COLLATE utf8_lithuanian_ci NOT NULL, `password` varchar(64) COLLATE utf8_lithuanian_ci NOT NULL, `kills` int(11) NOT NULL, `points` int(11) NOT NULL, `keys` int(11) NOT NULL, `chests` int(11) NOT NULL, `rang` int(11) NOT NULL, `skins` varchar(512) COLLATE utf8_lithuanian_ci NOT NULL, PRIMARY KEY (`username`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_lithuanian_ci"TABLE_NAME);
    
SQL_ThreadQueryg_hTuple"QueryCreateTable"szTables); 



All times are GMT -4. The time now is 20:49.

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