SA-MP Forums Archive
Problem callback [mysql] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem callback [mysql] (/showthread.php?tid=646875)



Problem callback [mysql] - RedGun2015 - 25.12.2017

Hello, I have a war system on my server.

When the war is over the server should calculate how had the most kills.

I use something like this:

Код:
mysql_format(SQL, gString, sizeof gString, "SELECT * FROM `warlogs` WHERE `WarID` = '%d';", warid);
	mysql_tquery(SQL, gString, "checkBestScore", "dddd", i, warid, attackers, defenders);
And this is the the callback that isn't called.

https://pastebin.com/ZKBJ4QVn

I try with printf, same, nothing in server_log


Re: Problem callback [mysql] - MEW273 - 25.12.2017

Do you see the print in your server log?
Код:
printf("something is not ok - turf = %d, warid = %d (%d, %d)", i, warid, group1, group2);
Can you check your MySQL log to see if there are any errors when you execute the query.


Re: Problem callback [mysql] - RedGun2015 - 25.12.2017

Quote:
Originally Posted by MEW273
Посмотреть сообщение
Do you see the print in your server log?
Код:
printf("something is not ok - turf = %d, warid = %d (%d, %d)", i, warid, group1, group2);
Can you check your MySQL log to see if there are any errors when you execute the query.
I tried but there is no error.

This is not the only print, i put the print inside , example:
https://pastebin.com/fWrt2TCQ
And nothing appears in server_log or mysql_log


Re: Problem callback [mysql] - MEW273 - 25.12.2017

There is nothing in your MySQL log? Not even record of the query trying to execute? This tells me either your code never reaches this query due to an error prior to this query, or perhaps your MySQL options are set to not log errors.

Given that error logs are enabled by default in the MySQL plugin and I doubt you have changed this to be otherwise, could you show the entire area of code prior to here:
Код:
mysql_format(SQL, gString, sizeof gString, "SELECT * FROM `warlogs` WHERE `WarID` = '%d';", warid);
mysql_tquery(SQL, gString, "checkBestScore", "dddd", i, warid, attackers, defenders);



Re: Problem callback [mysql] - RedGun2015 - 25.12.2017

Quote:
Originally Posted by MEW273
Посмотреть сообщение
There is nothing in your MySQL log? Not even record of the query trying to execute? This tells me either your code never reaches this query due to an error prior to this query, or perhaps your MySQL options are set to not log errors.

Given that error logs are enabled by default in the MySQL plugin and I doubt you have changed this to be otherwise, could you show the entire area of code prior to here:
Код:
mysql_format(SQL, gString, sizeof gString, "SELECT * FROM `warlogs` WHERE `WarID` = '%d';", warid);
mysql_tquery(SQL, gString, "checkBestScore", "dddd", i, warid, attackers, defenders);
edit : https://pastebin.com/TZ7heeVc


Re: Problem callback [mysql] - RedGun2015 - 26.12.2017

bump


Re: Problem callback [mysql] - sheenidgs - 27.12.2017

Quote:
Originally Posted by RedGun2015
Посмотреть сообщение
Make sure your function that want called is public and forwarded.


Re: Problem callback [mysql] - RedGun2015 - 27.12.2017

Quote:
Originally Posted by sheenidgs
Посмотреть сообщение
Make sure your function that want called is public and forwarded.
It is


Re: Problem callback [mysql] - RedGun2015 - 31.12.2017

bump


Re: Problem callback [mysql] - RedGun2015 - 03.01.2018

bump