Argument type mismatch (argument 3), Please HELP!!! -
bgedition - 29.04.2015
Hello Humans
You know what to do! pleas help me
the error:
BulgEdition.pwn(141) : error 035: argument type mismatch (argument 3)
That is part of account system:
Code:
LoginAttempts[playerid]--;
format(string, sizeof(string), "Welcome back %s to Bulgarian Edition!\nType your password below to login into your account!\nYou have %d attempts left!", GetPName(playerid), LoginAttempts[playerid]);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login into your account.", string, "Login", "Cancel");
if(LoginAttempts[playerid] == 1) {
format(string, sizeof(string), "Welcome back %s to Bulgarian Edition!\nType your password below to login into your account!\nThat is your FINAL attempt!", GetPName(playerid));
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login into your account.", string, "Login", "Cancel");
} else if(LoginAttempts[playerid] == 0) {
new kickerid = -1;
SendClientMessage(playerid, -1, "You has been kicked by the server. Reason: Incorrect Password.");
format(string, sizeof(string), "%s has been kicked by the server. Reason: %s", GetPName(playerid), ServerReasons[0]);
for(new i; i < MAX_PLAYERS; i++) {
if(i == playerid) continue;
SendClientMessage(i, -1, string);
}
Line 141: PublicKick(playerid, kickerid, ServerReasons[0]);
}
stock PublicKick(playerid, kickerid, reason) {
LogSave(0, playerid, kickerid, reason);
Kick(playerid);
return 1;
}
Re: Argument type mismatch (argument 3), Please HELP!!! -
J0sh... - 29.04.2015
Where is the Line?
Re: Argument type mismatch (argument 3), Please HELP!!! -
Darkwood17 - 29.04.2015
On which line you got that error?
Re: Argument type mismatch (argument 3), Please HELP!!! -
bgedition - 29.04.2015
Dudes its wroten
Re: Argument type mismatch (argument 3), Please HELP!!! -
J0sh... - 29.04.2015
What is the server reasons array?
Re: Argument type mismatch (argument 3), Please HELP!!! -
bgedition - 29.04.2015
There is
Code:
new ServerReasons[][] = {
{"Invalid Password."}, {"s-0beit"}
};
Re: Argument type mismatch (argument 3), Please HELP!!! -
bgedition - 29.04.2015
That is not bumping I just wantst to say if someone wants to see the full code there is no problem. Just say it.
Respuesta: Argument type mismatch (argument 3), Please HELP!!! -
alexus - 29.04.2015
First, reason has to be a string so declare
Code:
stock PublicKick(playerid, kickerid, reason[])
and the inside brackets are not necessary
Code:
{"Invalid Password.","s-0beit"}
Re: Argument type mismatch (argument 3), Please HELP!!! -
bgedition - 29.04.2015
Ok that works but now we have the same error but with argument 4 in line 159 which is:
Code:
stock PublicKick(playerid, kickerid, reason[]) {
line 159: LogSave(0, playerid, kickerid, reason);
Kick(playerid);
return 1;
}
because of this brackets
Respuesta: Argument type mismatch (argument 3), Please HELP!!! -
alexus - 29.04.2015
Can you show the beginning of LogSave ?