SQL_PrepareQuery Run Time Error 10
Error:
Code:
L 04/23/2011 - 09:35:36: [MySQL] Invalid database handle: 0PHP Code:
PHP Code:
Does anyone know what could this be? |
Re: SQL_PrepareQuery Run Time Error 10
It means that your g_DBConn is an invalid handle.
|
Re: SQL_PrepareQuery Run Time Error 10
Quote:
|
Re: SQL_PrepareQuery Run Time Error 10
Where do you create the connection (what function)?
|
Re: SQL_PrepareQuery Run Time Error 10
I set a timer on plugin_init, to connect to the SQL database after 1 second.
This is the connection: PHP Code:
|
Re: SQL_PrepareQuery Run Time Error 10
Players can connect during that time, calling the client_connect() forward before your connection to the database is made.
That is why you are getting your error. Instead of setting a task, you can create a separate config file with the cvars and force it to execute it on plugin_init() then read the cvars values for the connection. |
Re: SQL_PrepareQuery Run Time Error 10
Sorry for my bad English
Exolent, friend can you help me not quite understand I have the same problem, what should I do? help me tkx |
| All times are GMT -4. The time now is 19:46. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.