MySQL R41 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 R41 problem! (
/showthread.php?tid=645040)
MySQL R41 problem! -
RageCraftLV - 18.11.2017
C:\Users\Madars\Desktop\Motion-RP\gamemodes\motiongm1.pwn(28369) : error 035: argument type mismatch (argument 3)
Line 28369:
Код:
cache_get_value_int(0, "bskl_l", b_Sklad{5}); // bskl_l
new b_Sklad[8 char];
Converting from R39-6 to R41-4. In R39, there where no errors or warnings.
Also, how to fix this warning?
C:\Users\Madars\Desktop\Motion-RP\gamemodes\motiongm1.pwn(23516) : warning 213: tag mismatch
Код:
stock CreateAccount(playerid, password[])
{
if(PlayerRegistered[playerid] == 0) return CheatKick(playerid, 2112);
new pass[50];
mysql_escape_string(password, pass, dbHandle);
if(IsTextInvalid(pass))
{
SendClientMessage(playerid, COLOR_RED, "В пароле должны быть только буквы и цифры");
return Kick(playerid);
}
Re: MySQL R41 problem! -
Konstantinos - 18.11.2017
Char-arrays cannot be used in "passed by reference" method. Create a temporary variable to retrieve the value and then assign it back.
About
mysql_escape_string, the 3rd parameter is the
length (which is optional) and not the
connection handle (which is also optional).
pawn Код:
mysql_escape_string(password, pass, sizeof pass, dbHandle);