[Ajuda] Erro hash
#1

Alguem pode me ajudar com essa nubada q eu fiz ? agradeзo !

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
   if(!dialogid) {
      new Str[128], nome[20];
      GetPlayerName(playerid, nome, 20);
      format(Str, 128, "INSERT INTO `contas`(`Nome`, `Senha`, `Level`, `Admin`, `Respeito`, `Org`, `Membro`) VALUES ('%s', '%i', '%i', '%i', '%i', '%i', '%i')", nome, Hash(inputtext), 10, 8, 150, 2, 1); //linha 76 do erro
      mysql_function_query(connectt, Str, false, #, #);

      return 1;
}

Hash(dados[]) // linha 82 do erro
{
  new hashs;
  for(new i = (strlen(dados) - 1); i > -1; --1) hashs += (dados[1]*dados[(i+1)]); // linha 85 do erro
  return hashs;
}
Erros:

Код:
F:\Users\weverton\Desktop\Nova pasta\gamemodes\new.pwn(76) : error 017: undefined symbol "Hash"
F:\Users\weverton\Desktop\Nova pasta\gamemodes\new.pwn(82) : warning 217: loose indentation
F:\Users\weverton\Desktop\Nova pasta\gamemodes\new.pwn(82) : error 017: undefined symbol "Hash"
F:\Users\weverton\Desktop\Nova pasta\gamemodes\new.pwn(85) : error 017: undefined symbol "dados"
F:\Users\weverton\Desktop\Nova pasta\gamemodes\new.pwn(85) : error 022: must be lvalue (non-constant)
F:\Users\weverton\Desktop\Nova pasta\gamemodes\new.pwn(85) : error 017: undefined symbol "dados"
F:\Users\weverton\Desktop\Nova pasta\gamemodes\new.pwn(85) : fatal error 107: too many error messages on one line
Reply
#2

tenta usar esta stock

pawn Код:
/*Credits to Dracoblue*/

stock udb_hash(buf[]) {
    new length=strlen(buf);
    new s1 = 1;
    new s2 = 0;
    new n;
    for (n=0; n<length; n++)
    {
       s1 = (s1 + buf[n]) % 65521;
       s2 = (s2 + s1)     % 65521;
    }
    return (s2 << 16) + s1;
}
Reply
#3

Pode me dizer oq ela faz ?

#edit nao funfo

#edit 17:51:03 Resolvido !!! vlw ai era uma chave
Reply
#4

Deixa queto nгo vi o edit ;d
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)