+REP to fix - 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)
+--- Thread: +REP to fix (
/showthread.php?tid=367892)
+REP to fix -
kickerbat - 11.08.2012
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.
Re: +REP to fix -
Convex - 11.08.2012
i tried it but i have no errors and + gimme the line of these errors.
Re: +REP to fix -
Wesley221 - 11.08.2012
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.
Re: +REP to fix -
kickerbat - 11.08.2012
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 "," ?
Re: +REP to fix -
Wesley221 - 11.08.2012
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?
Re: +REP to fix -
kickerbat - 11.08.2012
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)
Re: +REP to fix -
kickerbat - 12.08.2012
Bump
Re: +REP to fix -
kickerbat - 12.08.2012
Anyfix?
Re: +REP to fix -
Jessyy - 12.08.2012
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);
}
Re: +REP to fix -
kickerbat - 12.08.2012
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.