mysql_tquery problem - 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_tquery problem (
/showthread.php?tid=617394)
mysql_tquery problem -
ranme15 - 20.09.2016
ay,
Код:
for(new i = 0; i < 16; i++) pInfo[playerid][Salt][i] = random(94) + 33;
SHA256_PassHash(inputtext, pInfo[playerid][Salt], pInfo[playerid][Password], 65);
new query[221];
mysql_format(SQL, query, sizeof(query), "INSERT INTO `users` (`username`, `password`, `salt`) VALUES ('%e', '%s', '%e')", pInfo[playerid][Name], pInfo[playerid][Password], pInfo[playerid][Salt]);
mysql_tquery(SQL, query, "OnPlayerRegister", "i", playerid);
log:
Код:
INSERT INTO `users` (`username`, `password`, `salt`) VALUES ('User', 'E8EFFFFCCCEB28E291B807EC16C1F9C7BDFED61475D8FC854EBCAE6A9D2C19D1', 'zuViawB<w%LRBkj1')
for some reason, this doesn't happen to call OnPlayerRegister and doesn't insert any data into the database.
(there is an existing `users` table and the MySQL connection is fine)
I keep getting random errors on mysql logs such as:
Код:
[plugins/mysql] Ђk‚ (C:\Games\GTA San Andreas\server\gamemodes\ss.pwn:2258)
line 2258:
Код:
mysql_tquery(SQL, query, "OnPlayerRegister", "i", playerid);
ideas?
Re: mysql_tquery problem -
Dayvison_ - 20.09.2016
https://github.com/pBlueG/SA-MP-MySQL/issues/120
Re: mysql_tquery problem -
ranme15 - 20.09.2016
Quote:
Originally Posted by Day_
|
zz
He claims that he had an invalid specifier on server.cfg, which I don't.
Is this plugin just bugged? shall I use an older version?
Re: mysql_tquery problem -
Konstantinos - 20.09.2016
Quote:
Originally Posted by ranme15
zz
He claims that he had an invalid specifier on server.cfg, which I don't.
Is this plugin just bugged? shall I use an older version?
|
The invalid specifier was related to the crash but not the initial report. It was later fixed (
fix log format bug).
Re: mysql_tquery problem -
ranme15 - 20.09.2016
Quote:
Originally Posted by Konstantinos
The invalid specifier was related to the crash but not the initial report. It was later fixed ( fix log format bug).
Thanks to your thread, I found another bug in the latest commit (can't escape any string) which will be fixed as soon as possible.
|
Re-downloaded, still getting these random characters errors.
Re: mysql_tquery problem -
Konstantinos - 20.09.2016
R42 isn't yet released (which has corrupted output fixed), but you can find the last artifacts for Windows in
AppVeyor. For Linux, you'll need to compile the plugin yourself.
Every time a bug is fixed or a new feature is added, it's updated and you can use it instead of waiting for an official release.