SA-MP Forums Archive
mysql not completing function - 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: mysql not completing function (/showthread.php?tid=604772)



mysql not completing function - ShoortyFl - 09.04.2016

I have a problem, mysql is not completing the function and idk why this is the log:

Quote:

[23:06:41] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `Teritorije` SET `Vlasnik` = 'Ballas' AND `Team` = '2' WH", callback: "OnQueryFinish", format: "i"
[23:06:41] [DEBUG] CMySQLQuery::Execute[OnQueryFinish] - starting query execution
[23:06:41] [DEBUG] CMySQLQuery::Execute[OnQueryFinish] - query was successfully executed within 0.312 milliseconds
[23:06:41] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[23:06:41] [DEBUG] Calling callback "OnQueryFinish"..
[23:06:41] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called

lines:

pawn Код:
TerVreme = 7200;
                TerZauzeta = 1;

                NapadaTeritoriju[playerid] = 0;

                TeInfo[zoneid][Team] = TeInfo[zoneid][BandaNapada];

                TeInfo[zoneid][PodNapadom] = 0;
                TeInfo[zoneid][ZonaVreme] = 0;
                GangZoneStopFlashForAll(TerID[zoneid]);
                GangZoneShowForAll(TerID[zoneid], GetTeamZoneColor(TeInfo[zoneid][Team]));
               
                if(TeInfo[zoneid][Team] == 1)
                {
                    GangZoneShowForAll(TerID[zoneid], 0xFF00FF88);
                }
                else if(TeInfo[zoneid][Team] == 2)
                {
                    GangZoneShowForAll(TerID[zoneid], 0xFF00FF88);
                }
               
                new kveri[600], vlasnik[64];

                if(TeInfo[zoneid][Team] == 1) { vlasnik = "Grove Street Family"; }
                else if(TeInfo[zoneid][Team] == 2) { vlasnik = "Ballas"; }

                format(kveri, sizeof(kveri), "UPDATE `Teritorije` SET `Vlasnik` = '%s' AND `Team` = '%d' WHERE `ID` = '%d'", vlasnik, TeInfo[zoneid][Team], zoneid);
                mysql_function_query(konekt, kveri, true, "OnQueryFinish", "i", THREAD_OSTALO);
               
                KillTimer(TeInfo[zoneid][ZoneTimer]);
I thought it was bc query lenght but it is not, please help


Respuesta: mysql not completing function - Xabi - 09.04.2016

It should be %d, not '%d'. Quotation marks are only used in strings.


Re: mysql not completing function - ShoortyFl - 09.04.2016

i dont think it's about that i use WHERE `ID` = '%d' on every system that has that type of saving and it's working perfectly


Re: mysql not completing function - ShoortyFl - 10.04.2016

Anyone?


Re: mysql not completing function - Konstantinos - 10.04.2016

Ignore debug logs as it never writes the full query. As long as it says "query was successfully executed" and it doesn't give any warning/error, it is fine.


Re: mysql not completing function - ShoortyFl - 10.04.2016

Yep, but the problem is, that it doesnt update database