+REP to fix
#1

Getting a error;

test2.pwn
Код:
#define FILTERSCRIPT
#include <a_samp>
#include <md5>
#include <sscanf2>
stock hashit(string[])
{
    new salt = 100;
    new hashed = MD5_Hash(MD5_Hash("salt"), MD5_Hash("%s"));
    return hashed;
}
public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	printf("MD5 HASH TEST: %s", hashit("123456"));
	print("--------------------------------------\n");
	return 1;
}
Error Log:
Код:
C:\Users\FBI\Desktop\core\B_Register\filterscripts\test2.pwn(8) : warning 202: number of arguments does not match definition
C:\Users\FBI\Desktop\core\B_Register\filterscripts\test2.pwn(8) : error 033: array must be indexed (variable "-unknown-")
C:\Users\FBI\Desktop\core\B_Register\filterscripts\test2.pwn(7) : warning 204: symbol is assigned a value that is never used: "rand"
C:\Users\FBI\Desktop\core\B_Register\filterscripts\test2.pwn(5) : warning 203: symbol is never used: "string"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Multipul MD5 + salt due to IPB intergration.
Reply
#2

i tried it but i have no errors and + gimme the line of these errors.
Reply
#3

pawn Код:
stock hashit(string[])
{
    new salt = 100;
    new hashed = MD5_Hash(MD5_Hash("salt"), MD5_Hash("%s"));
    return hashed;
}
Youre using the argument 'string' in here, but youre not using it anywhere in the function. Instead you use the %s, which is only available in format (and maybe some other functions aswell). Change the "%s" in just 'string', and it should work.
Reply
#4

What do you mean by changing the %s to string?

Also; what would be the correct way to join the "hashed" line above, with the "," ?
Reply
#5

MD5_Hash("%s") to MD5_Hash(string). Like that it would work.

And what you do you by joining the hashed line? You want both hashes put together, and that being hashed?
Reply
#6

Hi,

Basically it all needs to be one hash line, with no spaces or full stops or comma's etc.

Also;

Код:
C:\Users\FBI\Desktop\core\B_Register\filterscripts\test2.pwn(8) : error 033: array must be indexed (variable "-unknown-")
with the MD5_Hash(string)
Reply
#7

Bump
Reply
#8

Anyfix?
Reply
#9

If you want my advice try to use this ... https://sampforum.blast.hk/showthread.php?tid=65290

Код:
#include <a_samp>

native WP_Hash(buffer[], len, const str[]);

main()
{
    new
        buf[129];
    printf("hash");
    WP_Hash(buf, sizeof (buf), "The quick brown fox jumps over the lazy dog");
    print(buf);
}
Reply
#10

Quote:
Originally Posted by Jessyy
Посмотреть сообщение
If you want my advice try to use this ... https://sampforum.blast.hk/showthread.php?tid=65290

Код:
#include <a_samp>

native WP_Hash(buffer[], len, const str[]);

main()
{
    new
        buf[129];
    printf("hash");
    WP_Hash(buf, sizeof (buf), "The quick brown fox jumps over the lazy dog");
    print(buf);
}
Learn to read, Multipul MD5 + salt due to IPB intergration.

So no whirlpool doesn't support what i need.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)