06.03.2017, 20:55
Ok i was building an /changepass command but i keep getting this error.
C:\Users\Andre'\Desktop\Andre'\samp\gamemodes\ODA. pwn(1401) : error 035: argument type mismatch (argument 3)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
the coding:
C:\Users\Andre'\Desktop\Andre'\samp\gamemodes\ODA. pwn(1401) : error 035: argument type mismatch (argument 3)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
the coding:
PHP код:
CMD:changepassword(playerid,params[])
{
if( pInfo[playerid][Spawned] != 1)
{
ShowMessage(playerid, error, 9);
return 1;
}
new pass[25],file[256];
if(sscanf(params, "s[25]", pass)) return SendClientMessage(playerid, error, "Usage: /Changepassword <New Password>");
if(strlen(pass) < 5 || strlen(pass) > 20) return SendClientMessage(playerid,error,"Error: Password lenght must be between 5 - 20 chracters!");
format(file, 256, PATH, GetName(playerid));
new INI:ACCOUNT = INI_Open(file);
INI_SetTag(ACCOUNT,"data");
INI_WriteString(ACCOUNT, "Password",udb_hash(pass));
INI_Close(ACCOUNT);
format(astring, sizeof(astring),"Your password has been successfully changed.{FFFFFF} [NEW PASSWORD: %s]",pass);
return SendClientMessage(playerid,red,astring);
}
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;
}
PHP код:
INI_WriteString(ACCOUNT, "Password",udb_hash(pass)); //error line