Raised This Month: $ Target: $400
 0% 

Unknown Error


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Minimum
Senior Member
Join Date: Jun 2006
Old 12-10-2006 , 19:56   Unknown Error
Reply With Quote #1

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)

Last edited by Minimum; 12-10-2006 at 20:07.
Minimum is offline
Send a message via AIM to Minimum Send a message via MSN to Minimum
 



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 06:56.


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