MySQL R41 problem!
#1

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);
	}
Reply
#2

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);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)