Argument type mismatch (argument 3), Please HELP!!!
#1

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;
}
Reply
#2

Where is the Line?
Reply
#3

On which line you got that error?
Reply
#4

Dudes its wroten
Reply
#5

What is the server reasons array?
Reply
#6

There is
Code:
new ServerReasons[][] = {
	{"Invalid Password."}, {"s-0beit"}
};
Reply
#7

That is not bumping I just wantst to say if someone wants to see the full code there is no problem. Just say it.
Reply
#8

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"}
Reply
#9

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
Reply
#10

Can you show the beginning of LogSave ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)