Weirdest MySQL problem I've ever seen.. - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Weirdest MySQL problem I've ever seen.. (
/showthread.php?tid=208063)
Weirdest MySQL problem I've ever seen.. -
*IsBack - 07.01.2011
Hi,
I'm trying to solve this problem for hours already and just cannot seem to find the solution...
I'm trying to do Threaded mysql queries (using g-stylezzz plugin) and here's how it goes:
Thread are:
NC_T
and
L_T
but for some reason L_T doesn't get called:
pawn Код:
public OnQueryFinish(query[], resultid, extraid, connectionHandle)
{
printf("NC_T %i | L_T %i | Result: %i",NC_T,L_T,resultid);
if(resultid == NC_T)
{
print("NC_T called");
//This code works, it prints "NC_T 1 | L_T 2 | Result: 1" & "NC_T called" so that's ok
}
else if(resultid == L_T)
{
print("L_T called");
//This code DOES NOT work, it prints "NC_T 1 | L_T 2 | Result: 2" BUT NOT "L_T called" .. WHY???
}
It was switch(resultid){ earlier but I changed it with if/else since I thought that's the problem..
If you think my queries are bad, they're not. They worked fine with another mysql plugin..
Re: Weirdest MySQL problem I've ever seen.. -
DVDK - 07.01.2011
Try if instead of else if.
Re: Weirdest MySQL problem I've ever seen.. -
*IsBack - 07.01.2011
Quote:
Originally Posted by DVDK
Try if instead of else if.
|
...doesn't help...
Re: Weirdest MySQL problem I've ever seen.. -
*IsBack - 08.01.2011
as always I have to bump my threads..
The weirdest thing is that
I have
#define L_T 2
so L_T is 2;
and the resultid on OnQueryFinish callback is 2 too.
So why
if(resultid == L_T)
that would be if(2 == 2)
doesn't work??
Re: Weirdest MySQL problem I've ever seen.. -
*IsBack - 08.01.2011
Well.. here goes another bump..
This problem is still UNSOLVED! :S