[Ajuda] Erro ao compilar
#1

Код:
D:\Documents and Settings\Leandro\Desktop\gm.pwn(6650) : warning 208: function with tag result used before definition, forcing reparse
D:\Documents and Settings\Leandro\Desktop\gm.pwn(25) : warning 235: public function lacks forward declaration (symbol "db_hash")
D:\Documents and Settings\Leandro\Desktop\gm.pwn(27) : warning 219: local variable "var0" shadows a variable at a preceding level
D:\Documents and Settings\Leandro\Desktop\gm.pwn(27) : error 035: argument type mismatch (argument 1)
D:\Documents and Settings\Leandro\Desktop\gm.pwn(28) : warning 219: local variable "var1" shadows a variable at a preceding level
D:\Documents and Settings\Leandro\Desktop\gm.pwn(33) : error 028: invalid subscript (not an array or too many subscripts): "arg0"
D:\Documents and Settings\Leandro\Desktop\gm.pwn(33) : error 029: invalid expression, assumed zero
D:\Documents and Settings\Leandro\Desktop\gm.pwn(33) : error 029: invalid expression, assumed zero
D:\Documents and Settings\Leandro\Desktop\gm.pwn(33) : fatal error 107: too many error messages on one line
Linha (6650) =
Код:
{
        new var0[24];
	GetPlayerName(playerid, var0, 24);
	new var1[255];
	function620(var1, functionE14(var0));
	return var1;
}
Outras linhas:

Код:
public db_hash(arg0)
{
	new var0 = strlen(arg0);
	new var1 = 1;
	new var2 = 0;
	new var3 = 0;
	for(var3 = 0; var3 < var0; var3++)
	{
		var1 = (var1 + arg0[var3]) % 65521;
		var2 = (var2 + var1) % 65521;
	}
	return var1 + (var2 << 16);
}
Se alguem puder me ajudar dizer oque esta causando isso fico grato
Reply
#2

Em relacгo a criptografia de senha hash acho que nгo a necessidade de criar uma funcгo para tal, ultilize o seguinte: na select do db e й claro faзa a mesma coisa no insert ou no update caso haja possibilidade de alteraзгo de senha:

pawn Код:
new passwd[64], name[MAX_PLAYER_NAME, q[128];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
mysql_real_escape_string(password,passwd);
    format(q, sizeof(q), "SELECT id FROM `"TABLENAME_USERS"` WHERE LOWER(nome) = LOWER('%s') AND senha=sha1('%s') LIMIT 1", name, passwd);
    mysql_query(q);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)