SA-MP Forums Archive
[MySQl] Register System 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] Register System Problem.. (/showthread.php?tid=348080)



[MySQl] Register System Problem.. - TiNcH010 - 04.06.2012

Hello everybody! When I try to register in my server using MySQl register system the server crashes with the function mysql_real_escape_string.

pawn Код:
mysql_real_escape_string(inputtext, escpass);
WP_Hash(largestring, sizeof(largestring), escpass);
GetPlayerIp(playerid, PIP, 50);
format(Query, sizeof(Query), "INSERT INTO `playerinfo` (`user`, `password`, `kills`, `deaths`, `score`, `money`, `IP`, `adminlvl`) VALUES ('%s', '%s', 0, 0, 0, 0, '%s', 0)", escpname(playerid), largestring, PIP);
mysql_query(Query);
GameTextForPlayer(playerid, "~g~Registrado", 2000, 3);
SendClientMessage(playerid, 0x0000D9AA, "Registrado y logeado correctamente!");
SetPVarInt(playerid, "Logged", 1);
PD: I'm using this test FS https://sampforum.blast.hk/showthread.php?tid=269610


Re: [MySQl] Register System Problem.. - mati233 - 04.06.2012

I didn't saw what is the FS you're using but, why would you need to use the mysql_real_escape_string if you're going to encrypt it? Why don't you simple remove it?