SA-MP Forums Archive
Problem with MD5 hash... - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problem with MD5 hash... (/showthread.php?tid=80424)



Problem with MD5 hash... - Dreftas - 04.06.2009

if(MD5_Hash(params) != strval(str))

Here i get error:
pawn Код:
error 033: array must be indexed (variable "MD5_Hash")
Here script must do these steps:
> Hash writed password which is 'params'
> check if hashed params == strval(str), which is retrieved from mysql.

How to fix that error? :/


Re: Problem with MD5 hash... - Dreftas - 04.06.2009

No one know ? :/


Re: Problem with MD5 hash... - Luka P. - 04.06.2009

Try to put MD5_Hash into a array?


Re: Problem with MD5 hash... - samgreen - 04.06.2009

Quote:
Originally Posted by [Luka
]
Try to put MD5_Hash into a array?
I think you are misinterpreting the error.

Quote:
Originally Posted by Dreftas
if(MD5_Hash(params) != strval(str))

Here i get error:
pawn Код:
error 033: array must be indexed (variable "MD5_Hash")
Here script must do these steps:
> Hash writed password which is 'params'
> check if hashed params == strval(str), which is retrieved from mysql.

How to fix that error? :/
Please post your MD5_Hash function. I don't think you want to compare the strval with the hash. MD5 hashes are alphanumeric (letters and numbers). Using strval will almost certainly alter the hash. Once I see the hash function I can offer you more guidance.


Re: Problem with MD5 hash... - Dreftas - 04.06.2009

I fixed it.
Im just used udb_hash for a long time(which is integer) so i left strval and other shit with it Now when i started php+mysql I changed hash to md5 which is new for me