Raised This Month: $ Target: $400
 0% 

Run time error 10: native error (native "SQL_ReadResult")


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
V I R U S
Senior Member
Join Date: Jul 2004
Location: Russia / Germany
Old 03-09-2008 , 18:47   Run time error 10: native error (native "SQL_ReadResult")
Reply With Quote #1

Hi all. I wrote a stats plugin few weeks ago. Suddenly i saw a log, with some errors in it.

Code:
L 03/09/2008 - 00:04:49: Start of error session.
L 03/09/2008 - 00:04:49: Info (map "cs_militia") (file "addons/amxmodx/logs/error_20080309.log")
L 03/09/2008 - 00:04:49: [MySQL] No result set in this query!
L 03/09/2008 - 00:04:49: [AMXX] Displaying debug trace (plugin "xtcs_userstats.amxx")
L 03/09/2008 - 00:04:49: [AMXX] Run time error 10: native error (native "SQL_ReadResult")
L 03/09/2008 - 00:04:49: [AMXX]    [0] xtcs_userstats.sma::client_disconnect (line 94)
L 03/09/2008 - 00:04:49: [MySQL] No result set in this query!
L 03/09/2008 - 00:04:49: [AMXX] Displaying debug trace (plugin "xtcs_userstats.amxx")
L 03/09/2008 - 00:04:49: [AMXX] Run time error 10: native error (native "SQL_ReadResult")
L 03/09/2008 - 00:04:49: [AMXX]    [0] xtcs_userstats.sma::client_disconnect (line 94)
L 03/09/2008 - 00:04:49: [MySQL] No result set in this query!
L 03/09/2008 - 00:04:49: [AMXX] Displaying debug trace (plugin "xtcs_userstats.amxx")
L 03/09/2008 - 00:04:49: [AMXX] Run time error 10: native error (native "SQL_ReadResult")
L 03/09/2008 - 00:04:49: [AMXX]    [0] xtcs_userstats.sma::client_disconnect (line 110)
L 03/09/2008 - 00:15:34: Start of error session.
L 03/09/2008 - 00:15:34: Info (map "de_cpl_fire") (file "addons/amxmodx/logs/error_20080309.log")
L 03/09/2008 - 00:15:34: [MySQL] No result set in this query!
L 03/09/2008 - 00:15:34: [AMXX] Displaying debug trace (plugin "xtcs_userstats.amxx")
L 03/09/2008 - 00:15:34: [AMXX] Run time error 10: native error (native "SQL_ReadResult")
L 03/09/2008 - 00:15:34: [AMXX]    [0] xtcs_userstats.sma::client_disconnect (line 110)

This is the part of the code:

Code:
public client_disconnect(id)
{
 new clientname[32];
 new szStats[8],szBHits[8];
 new kills_map,deaths_map,headshots_map,teamkilling_map,shots_map,hits_map;
 get_user_name(id,clientname,31);
 get_user_rstats(id,szStats,szBHits);
 // READ MAIN DATA
 new Handle:QueryMain = SQL_PrepareQuery(SqlConnection, "SELECT `kills`,`deaths`,`headshots`,`teamkilling`,`shots`,`hits`,`eff`,`acc`,`skill` from xtcs_data WHERE csname = '%s'", clientname);
 SQL_Execute(QueryMain);
 kills = SQL_ReadResult(QueryMain,0);
 deaths = SQL_ReadResult(QueryMain,1);
 headshots = SQL_ReadResult(QueryMain,2);
 teamkilling = SQL_ReadResult(QueryMain,3);
 shots = SQL_ReadResult(QueryMain,4);
 hits = SQL_ReadResult(QueryMain,5);
 eff = SQL_ReadResult(QueryMain,6);
 acc = SQL_ReadResult(QueryMain,7);
 skill = SQL_ReadResult(QueryMain,8);
 
 SQL_FreeHandle(QueryMain);
 
 // READ MAP DATA
 new Handle:QueryMap = SQL_PrepareQuery(SqlConnection, "SELECT `kills`,`deaths`,`headshots`,`teamkilling`,`shots`,`hits` from xtcs_data_map WHERE csname = '%s'", clientname);
 SQL_Execute(QueryMap);
 kills_map = SQL_ReadResult(QueryMap,0);
 deaths_map = SQL_ReadResult(QueryMap,1);
 headshots_map = SQL_ReadResult(QueryMap,2);
 teamkilling_map = SQL_ReadResult(QueryMap,3);
 shots_map = SQL_ReadResult(QueryMap,4);
 hits_map = SQL_ReadResult(QueryMap,5);
 SQL_FreeHandle(QueryMap);
 
...
}
Lines 99 and 100 are bold. What is so wrong in it?!
__________________
V I R U S is offline
Send a message via ICQ to V I R U S
 



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 22:49.


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