Raised This Month: $ Target: $400
 0% 

how do you wait for sql to connect before doing an action?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
slurpycof
Senior Member
Join Date: Nov 2004
Old 04-26-2005 , 09:26   how do you wait for sql to connect before doing an action?
Reply With Quote #1

I have this task to connect to the sql database
Code:
set_task(0.1,"sql_init")

and then I am using public client_authorized(id){ to execute code and read data from the database.

The problem that I am having is that users that connect right away on a map change give an error like this
Code:
L 04/25/2005 - 20:07:20: [AMXX] Run time error 10 (native) (plugin "frequentfraggerprogram.amxx") - debug not enabled.
L 04/25/2005 - 20:07:20: [MYSQL] Invalid database handle -1
L 04/25/2005 - 20:07:20: [AMXX] To enable debug mode, add " debug" after the plugin name in plugins.ini (without quotes).
L 04/25/2005 - 20:07:20: [AMXX] Run time error 10 (native) (plugin "frequentfraggerprogram.amxx") - debug not enabled.
L 04/25/2005 - 20:07:20: [MYSQL] Invalid result handle -6
How would I delay them connecting until the database is connected so that the plugin can read their data?
slurpycof 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:40.


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