07.07.2014, 21:57
hello as my first topic was about the same problem in a different way I did something new in da dudb include and hashing, but I got some errors I hope this thing can work
my code:
ma errors
my code:
pawn Код:
stock udb_CheckLogin(nickname[],pwd[]) {
new fname[MAX_STRING], hashpass[129];
WP_Hash(hashpass,sizeof(hashpass),pwd);
format(fname,sizeof(fname),"SFTDM/Users/%s.sav",udb_encode(nickname));
if (udb_UserInt(nickname,"password_hash")==hashpass) return true;
return false;
}
stock udb_Create(nickname[],pwd[]) {
if (udb_Exists(nickname)) return false;
new fname[MAX_STRING], hashpass[129];
WP_Hash(hashpass,sizeof(hashpass),pwd);
format(fname,sizeof(fname),"SFTDM/Users/%s.sav",udb_encode(nickname));
dini_Create(fname);
udb_UserSetInt(nickname,"password_hash",hashpass);
return true;
}
PHP код:
blabla\include\dudb.inc(141) : error 033: array must be indexed (variable "hashpass")
blabla\include\dudb.inc(152) : error 035: argument type mismatch (argument 3)