SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 24/03/2020, 08:42 AM   #21
RazvyShel
Little Clucker
 
Join Date: Jul 2015
Posts: 14
Reputation: 0
Default Re: mysql_tquery not calling callback.

I found a fix, a kind of wierd one though.

PHP Code:
public OnGameModeInit() {

    
defer CallLoadCars();

    return 
true;
}

timer CallLoadCars[1000](){
    
InitCarData();

Delaying the loading of the cars gives time for the mysql to connect, and so the cars get loaded. I have no idea why this is like this, or if this timer is a good fix or not.
RazvyShel is offline   Reply With Quote
Old 24/03/2020, 09:16 AM   #22
SiaReyes
Gangsta
 
SiaReyes's Avatar
 
Join Date: Mar 2019
Location: Coordinates X,Y,Z
Posts: 622
Reputation: 57
Default Re: mysql_tquery not calling callback.

Or just put the InitCarData(); after few lines of codes.(even try at last)
SiaReyes is offline   Reply With Quote
Reply

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
mysql_tquery - No callback specified, skipping result saving Jonesy96 Scripting Help 3 01/06/2016 06:45 PM
mysql_tquery, callback didn't call Dutheil Scripting Help 1 24/07/2015 10:52 PM
Mysql_tquery callback return 1; Banditukas Scripting Help 2 25/12/2014 11:21 AM
Callback not called by mysql_tquery S4t3K Scripting Help 12 14/06/2014 07:42 PM
Calling a callback by myself? dusk Scripting Help 3 30/05/2014 12:05 PM


All times are GMT. The time now is 04:36 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.