SA-MP Forums Archive
Not Update - 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: Not Update (/showthread.php?tid=571910)



Not Update - norton2 - 23.04.2015

Код HTML:
mysql_format(MySQL, query, sizeof(query), "UPDATE `players` SET `Admin`=%d WHERE `ID`=%d", pInfo[id][pAdmin], pInfo[id][pID]);
mysql_tquery(MySQL, query, "", "");
print(query); //Debug
Debug Log:
Код HTML:
[08:26:54] (null)



Re: Not Update - AberKane - 23.04.2015

Are you sure that query is a string ?
Код:
query[60];
Код:
This forum requires that you wait 120 seconds between posts. Please try again in 37 seconds.
I don't want to come to this planet anymore.



Re: Not Update - norton2 - 23.04.2015

Yes, "query" is string.
Код HTML:
new query[254];



Re: Not Update - Konstantinos - 23.04.2015

It'd print "(null)" only if both functions failed which is your case. Check the mysql logs because either the connection to mysql server was not successful or invalid connection handle.


Re: Not Update - norton2 - 23.04.2015

MYSQL ERROR:



Re: Not Update - Konstantinos - 23.04.2015

Yeah, it's an invalid connection handle. In On GameMode/FilterScript Init:
pawn Код:
MySQL = mysql_connect(...);



Re: Not Update - norton2 - 23.04.2015

Код HTML:
[09:05:47] Successfully connected to MySQL database.



Re: Not Update - norton2 - 23.04.2015

Solved.
@Konstantinos: Thank you.