Raised This Month: $ Target: $400
 0% 

Weird....SQL....


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 03-21-2006 , 21:11   Weird....SQL....
Reply With Quote #1

Alright there again. Hello.

I'm currently converting over Harbu's RP plugins to 1.7, and it's been a success so far, there is only one problem.

Code:
new query[256], npc_origin[3], npcid, hardcode         format(query,255,"SELECT npcid,x,y,z,hardcode FROM npc")         result = dbi_query(dbc,"%s",query)         if(result >= RESULT_OK)         {               new rows = dbi_num_rows(result)             for( new i = 0; i < rows; i++)             {                 dbi_nextrow(result)                                 npcid = dbi_field(result,1)                 npc_origin[0] = dbi_field(result,2)                 npc_origin[1] = dbi_field(result,3)                 npc_origin[2] = dbi_field(result,4)                 hardcode = dbi_field(result,5)                                 if(get_distance(origin,npc_origin) <= 25.0)                 {                     if(hardcode == 1)                     {                         Bank_Npc(id)                         break                     } else if(hardcode == 2)                         {                             prodigy(id)                             break                         } else if(hardcode == 0)                             {                                 shop_options(id,npcid)                                 break                                                             }                 }             }             dbi_free_result(result)         }


That returns an error on the free_result after I use the /buy command at a counter.
Any particular reason you can spot out why that would occur?

Thanks.
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 03-21-2006 , 21:17  
Reply With Quote #2

What is the error?
Brad is offline
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 03-21-2006 , 21:38  
Reply With Quote #3

Invalid Result Handle -1
Run time error 10: native error <native "dbi_free_result">
HarbuRPAlpha.sma::buystuff <line 3320>

Line 3320:
Code:
dbi_free_result(result)
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 03-21-2006 , 21:49  
Reply With Quote #4

And you are sure that is the exact code that is around that line?
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 03-21-2006 , 21:54  
Reply With Quote #5

Yes. This shouldn't be happening, that's why I said....weird...
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
Reply



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