Raised This Month: $ Target: $400
 0% 

plugin start and mapstart order sql


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
pride95
Senior Member
Join Date: Aug 2015
Old 10-05-2017 , 04:27   plugin start and mapstart order sql
Reply With Quote #1

In plugin start: tconnect database
In onmapstart: a simple tquery

when i restart the server, tconnect its working(and db receives the handle), but onmapstart the tquery dont executes cause db == invalid handle. if i change the map, the tquery its working. the order of execution is not onpluginstart and after onmapstart? Now i use a timer of 5 seconds to work correctly.

Last edited by pride95; 10-05-2017 at 07:29.
pride95 is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 10-05-2017 , 10:44   Re: plugin start and mapstart order sql
Reply With Quote #2

If you choose to use the threaded connect query, then you can't assume it will be finished by any arbitrary point of time. Either use the non-threaded connect or make use of the callback to arrange your logic so you know the connection has been established before sending queries.
Fyren 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 00:07.


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