Raised This Month: $51 Target: $400
 12% 

Problem with mysql_amxx


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Zorix
New Member
Join Date: Nov 2005
Old 11-03-2005 , 21:35   Problem with mysql_amxx
Reply With Quote #1

After seeing some problems using Harbu's TSRP plugin mecklenburg_final in amxx 1.01 I decided to convert to 1.60 and learn the amx scripting to fix the source files. I have finally modified and fixed Harbu's RP scripts and they compile. I have upgraded to amxx 1.60 and replaced the compiled plugins with the new ones I have created. However, the message I get says:

[Harbu Talkarea] Could Not Connect To SQL Database

I then remembered I run MySql 4.1 and updated the dll from the forum file. That stopped it from working totally. So I am left to wonder what the problem is here. I have not modified any database scripting in Harbu's files but something could have changed since 1.01. If anyone has any ideas or suggestions I would appreciate it. Thanks!
Zorix is offline
Zorix
New Member
Join Date: Nov 2005
Old 11-03-2005 , 21:48  
Reply With Quote #2

I think I may have found the answer. After looking at the TSX.inc file, i modified it with the 1.01 file so it would have the commands such as ts_getuserwpn and ts_giveweapon which were missing! The sma files wouldnt compile without this and the scripting document says these functions exist. WHen forcing a map change I was able to see that these commands do not exist anymore. This completely breaks everything. Why was it removed and how can I get it back for amx 1.60? Thanks for your help guys.
Zorix is offline
Zorix
New Member
Join Date: Nov 2005
Old 11-03-2005 , 22:58  
Reply With Quote #3

Looks like I'm talking to myself tonight.. I was able to find the natives in the tsfun but I get this message now relating to the SQL database which was my original problem:

L 11/03/2005 - 21:528: [MYSQL] Invalid result handle -1
L 11/03/2005 - 21:528: [AMXX] Displaying debug trace (plugin "HarbuRPAlpha.amxx")
L 11/03/2005 - 21:528: [AMXX] Run time error 10: native error (native "dbi_free_result")
L 11/03/2005 - 21:528: [AMXX] [0] HarbuRPAlpha.sma::salary (line 2025)
L 11/03/2005 - 21:528: [MYSQL] Invalid result handle -1
L 11/03/2005 - 21:528: [AMXX] Displaying debug trace (plugin "HarbuRPAlpha.amxx")
L 11/03/2005 - 21:528: [AMXX] Run time error 10: native error (native "dbi_free_result")
L 11/03/2005 - 21:528: [AMXX] [0] HarbuRPAlpha.sma::activehud (line 2079)
Zorix is offline
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 11-04-2005 , 08:11  
Reply With Quote #4

Quote:
Originally Posted by Zorix
Looks like I'm talking to myself tonight.. I was able to find the natives in the tsfun but I get this message now relating to the SQL database which was my original problem:

L 11/03/2005 - 21:528: [MYSQL] Invalid result handle -1
L 11/03/2005 - 21:528: [AMXX] Displaying debug trace (plugin "HarbuRPAlpha.amxx")
L 11/03/2005 - 21:528: [AMXX] Run time error 10: native error (native "dbi_free_result")
L 11/03/2005 - 21:528: [AMXX] [0] HarbuRPAlpha.sma::salary (line 2025)
L 11/03/2005 - 21:528: [MYSQL] Invalid result handle -1
L 11/03/2005 - 21:528: [AMXX] Displaying debug trace (plugin "HarbuRPAlpha.amxx")
L 11/03/2005 - 21:528: [AMXX] Run time error 10: native error (native "dbi_free_result")
L 11/03/2005 - 21:528: [AMXX] [0] HarbuRPAlpha.sma::activehud (line 2079)
those are all the result of poor coding, looks like you are using dbi_free_result on invalid handles. You only need to free the results if you ran a query that has results, like a select query. If you post the current code or sma I might be willing to fix a chunk of it so you can see properl DBI coding for amxx, since no one seems to do it correctly.
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
Zorix
New Member
Join Date: Nov 2005
Old 11-04-2005 , 09:26  
Reply With Quote #5

Alright, I was able to find an example and add an if statement to check for -1 first. However, I still cannot connect to mysql database that did work in amxx 1.01. I run mysql 4.1 which could be the problem. Still lookin into that. Thanks.
Zorix is offline
baked_duck
Junior Member
Join Date: Jan 2006
Old 01-02-2006 , 22:57  
Reply With Quote #6

Hey, im having the exact same problem. And jtp, you said you would be willing to help so heres the sma.

-Edit

Mines sorta different. Heres the error.

Code:
L 01/02/2006 - 21:57:05: [AMXX] Native error in "dbi_free_result" on line 2025 (file "HarbuRPAlpha.sma").
L 01/02/2006 - 21:57:05: [MYSQL] Invalid result handle -2
L 01/02/2006 - 21:57:05: [AMXX] Native error in "dbi_free_result" on line 2079 (file "HarbuRPAlpha.sma").
L 01/02/2006 - 21:57:05: [MYSQL] Invalid result handle -2
Attached Files
File Type: sma Get Plugin or Get Source (harburpalpha.sma - 766 views - 202.3 KB)
baked_duck is offline
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 12:00.


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