AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Unknown Error (https://forums.alliedmods.net/showthread.php?t=48382)

Minimum 12-10-2006 19:56

Unknown Error
 
I am getting some strange error with this function. I only get it when another plugin tries to use it. The debug trace points it to the line with result = dbi_query(dbc,query). So I put in a server_print as you can see and it returned this SELECT FROM ♦ WHERE steamid = ''. Something very strange is going on here.

Function Code -
Code:
public _testsqlint(table[],index[],authid[],equals[16],limit) {     new x     if(dbc < SQL_OK || limit > 15) return false     format(query,255,"SELECT %s FROM %s WHERE steamid = '%s'",index,table,authid)     server_print(query)     result = dbi_query(dbc,query)     if(dbi_nextrow(result) < 1) return false     x = dbi_field(result,1)     dbi_free_result(result)     for(new i=0;i < limit;i++) {         if(equals[i] == x) return true     }     format(query,255,"SELECT * FROM admins WHERE steamid = '%s' AND full_access = 1",authid)     result = dbi_query(dbc,query)     if(dbi_nextrow(result) > 0) {         dbi_free_result(result)         return true     }     dbi_free_result(result)     return false }

Include Code -
Code:
// SQL Test Integer native select_integer(table[],index[],authid[],equals[16],limit);

Plugin Code -
Code:
stuff[0] = 21 stuff[1] = 15 if(!select_integer("players","id",authid,stuff,2)) return PLUGIN_HANDLED

Error Message -
Code:

L 12/10/2006 - 16:06:01: [MySQL] Invalid DBI result handle -1
L 12/10/2006 - 16:06:01: [AMXX] Displaying debug trace (plugin "GabionKernel.amxx")
L 12/10/2006 - 16:06:01: [AMXX] Run time error 10: native error (native "dbi_nextrow")
L 12/10/2006 - 16:06:01: [AMXX]    [0] GabionKernel.sma::_testsqlint (line 296)
L 12/10/2006 - 16:06:01: Unhandled dynamic native error
L 12/10/2006 - 16:06:01: [AMXX] Displaying debug trace (plugin "explode.amxx")
L 12/10/2006 - 16:06:01: [AMXX] Run time error 10: native error (native "select_integer")
L 12/10/2006 - 16:06:01: [AMXX]    [0] explode.sma::exploded (line 36)


The Specialist 12-10-2006 20:01

Re: Unknown Error
 
can you post the error message ?

Minimum 12-10-2006 20:05

Re: Unknown Error
 
Posted on the main post.

Minimum 12-15-2006 20:11

Re: Unknown Error
 
Anyone? Its been 4 days and no support.


All times are GMT -4. The time now is 06:56.

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