Raised This Month: $ Target: $400
 0% 

dbi_query error


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Des12
Senior Member
Join Date: Jan 2005
Old 03-26-2006 , 20:32   dbi_query error
Reply With Quote #1

Here is the part of my code that is having problems:

Code:
new Sql:dbc new Result:result // ... public client_putinserver(id) {     set_task(1.0,"checkSteam",id)     return PLUGIN_HANDLED } public checkSteam(id) {     new query[256],sqlid[46], authid[32]     get_user_authid(id, authid, 31)     format(query,255,"SELECT steamid, reason, time FROM tempbans")     result = dbi_query(dbc,query) //**PROBLEM HERE**     while(dbi_nextrow(result) > 0)     {         dbi_result(result, "steamid" , sqlid , 45)         if(equali(authid,sqlid)) {             new reason[101], var;             dbi_result(result, "reason" , reason , 100)             var = dbi_result(result, "time")             new name[32]             get_user_name(id,name,31)             client_print(0,print_chat,"[AMXX] %s (%s) is still banned for %i minutes",name,authid,var)             server_cmd("kick #%d ^"%s (%i minutes left in ban)^"",get_user_userid(id),reason,var)             return PLUGIN_HANDLED         }             }     dbi_free_result(result)         return PLUGIN_HANDLED }

Code:
L 03/26/2006 - 20:20:18: [AMXX] Displaying debug trace (plugin "tempban.amxx")
L 03/26/2006 - 20:20:18: [AMXX] Run time error 10: native error (native "dbi_query")
L 03/26/2006 - 20:20:18: [AMXX]    [0] tempban.sma::checkSteam (line 218)
L 03/26/2006 - 20:20:18: [MYSQL] Invalid database handle 0
It suddenly stopped working today. Is this because there is only one row and it needs two or more to function?
__________________
-Dest Romano

www.JustRP.com
A TSRP Server

Quote:
Originally Posted by Brad
Don't you go be bringing reality into this.
Des12 is offline
 


Thread Tools
Display Modes

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 16:30.


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