Problem callback [mysql]
#1

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
Reply
#2

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.
Reply
#3

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
Reply
#4

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);
Reply
#5

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
Reply
#6

bump
Reply
#7

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

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

bump
Reply
#10

bump
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)