[HELP] /changepass 1 Error - 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: [HELP] /changepass 1 Error (
/showthread.php?tid=208218)
[HELP] /changepass 1 Error -
]B4E[kengston - 08.01.2011
Код:
//changepass
if(!strcmp(strget(cmdtext,0),"/changepass"))
{
if(!strlen(strget(cmdtext,1)))
return
SendClientMessage(playerid,COLOR_GREY,"Use: /changepass [Password]");
new name[MAX_PLAYER_NAME];
new accFormat[128];
new pass = strval(strget(cmdtext,1));
new string[128];
GetPlayerName(playerid,name,sizeof(name));
format(accFormat,sizeof(accFormat),"/Players/%s.datei",name);
format(string,sizeof(string),"%s",pass);
dini_IntSet(accFormat,"Passwort",string);
return 1;
}
Код:
BJ.pwn(8656) : error 035: argument type mismatch (argument 3)
Line 8656:
Код:
dini_IntSet(accFormat,"Passwort",string);
Please help me.
Re: [HELP] /changepass 1 Error -
Padarom - 08.01.2011
You're trying to load an Integer with a string, thats the problem.
Try
pawn Код:
if(!strcmp(strget(cmdtext,0),"/changepass"))
{
if(!strlen(strget(cmdtext,1))) return SendClientMessage(playerid,COLOR_GREY,"Use: /changepass [Password]");
new name[MAX_PLAYER_NAME];
new accFormat[128];
new pass = strval(strget(cmdtext,1));
new string[128];
GetPlayerName(playerid,name,sizeof(name));
format(accFormat,sizeof(accFormat),"/Players/%s.datei",name);
format(string,sizeof(string),"%s",pass);
dini_Set(accFormat,"Passwort",string); // dini_IntSet -> dini_Set
return 1;
}
AW: [HELP] /changepass 1 Error -
]B4E[kengston - 08.01.2011
Master
Thank you Padarom
Re: [HELP] /changepass 1 Error -
Padarom - 08.01.2011
Don't mention it, only a careless mistake :P
Padarom