SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 29/04/2015, 04:19 PM   #1
bgedition
Huge Clucker
 
bgedition's Avatar
 
Join Date: Oct 2013
Location: 127.0.0.1
Posts: 417
Reputation: 37
Default Argument type mismatch (argument 3), Please HELP!!!

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;
}
__________________
Never point your finger at some one, you will always have three fingers pointing back at you.
bgedition is offline   Reply With Quote
Old 29/04/2015, 04:36 PM   #2
J0sh...
Banned
 
Join Date: Aug 2014
Location: Hamburger
Posts: 1,276
Reputation: 461
Default Re: Argument type mismatch (argument 3), Please HELP!!!

Where is the Line?
J0sh... is offline   Reply With Quote
Old 29/04/2015, 04:36 PM   #3
Darkwood17
Huge Clucker
 
Join Date: Oct 2014
Posts: 305
Reputation: 52
Default Re: Argument type mismatch (argument 3), Please HELP!!!

On which line you got that error?
Darkwood17 is offline   Reply With Quote
Old 29/04/2015, 04:37 PM   #4
bgedition
Huge Clucker
 
bgedition's Avatar
 
Join Date: Oct 2013
Location: 127.0.0.1
Posts: 417
Reputation: 37
Default Re: Argument type mismatch (argument 3), Please HELP!!!

Dudes its wroten
__________________
Never point your finger at some one, you will always have three fingers pointing back at you.
bgedition is offline   Reply With Quote
Old 29/04/2015, 04:38 PM   #5
J0sh...
Banned
 
Join Date: Aug 2014
Location: Hamburger
Posts: 1,276
Reputation: 461
Default Re: Argument type mismatch (argument 3), Please HELP!!!

What is the server reasons array?
J0sh... is offline   Reply With Quote
Old 29/04/2015, 04:41 PM   #6
bgedition
Huge Clucker
 
bgedition's Avatar
 
Join Date: Oct 2013
Location: 127.0.0.1
Posts: 417
Reputation: 37
Default Re: Argument type mismatch (argument 3), Please HELP!!!

There is
Code:
new ServerReasons[][] = {
	{"Invalid Password."}, {"s-0beit"}
};
__________________
Never point your finger at some one, you will always have three fingers pointing back at you.
bgedition is offline   Reply With Quote
Old 29/04/2015, 04:54 PM   #7
bgedition
Huge Clucker
 
bgedition's Avatar
 
Join Date: Oct 2013
Location: 127.0.0.1
Posts: 417
Reputation: 37
Default Re: Argument type mismatch (argument 3), Please HELP!!!

That is not bumping I just wantst to say if someone wants to see the full code there is no problem. Just say it.
__________________
Never point your finger at some one, you will always have three fingers pointing back at you.
bgedition is offline   Reply With Quote
Old 29/04/2015, 04:57 PM   #8
alexus
Big Clucker
 
alexus's Avatar
 
Join Date: Mar 2011
Location: Madrid
Posts: 121
Reputation: 11
Default Respuesta: Argument type mismatch (argument 3), Please HELP!!!

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"}
__________________
alexus is offline   Reply With Quote
Old 29/04/2015, 05:03 PM   #9
bgedition
Huge Clucker
 
bgedition's Avatar
 
Join Date: Oct 2013
Location: 127.0.0.1
Posts: 417
Reputation: 37
Default Re: Argument type mismatch (argument 3), Please HELP!!!

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
__________________
Never point your finger at some one, you will always have three fingers pointing back at you.
bgedition is offline   Reply With Quote
Old 29/04/2015, 05:17 PM   #10
alexus
Big Clucker
 
alexus's Avatar
 
Join Date: Mar 2011
Location: Madrid
Posts: 121
Reputation: 11
Default Respuesta: Argument type mismatch (argument 3), Please HELP!!!

Can you show the beginning of LogSave ?
__________________
alexus is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Ajuda] Ajuda para resolver argument type mismatch(argument 1) Infiniteplay Português/Portuguese 12 01/03/2015 08:01 AM
C:\Users\Lirbo\Desktop\Roleplay\gamemodes\ERP.pwn( 19) : error 035: argument type mismatch (argument 1) Lirbo Scripting Help 2 12/12/2014 02:51 PM
error 35: Argument Type Mismatch (argument 2) Forbidden Name System Stoyanov Scripting Help 2 01/11/2014 08:50 PM
Argument type mismatch (argument 1) when getting info from MySQL database kamiliuxliuxliux Scripting Help 3 05/06/2014 02:08 PM
error 035: argument type mismatch (argument 2) [Using MySQL R7/R8 With Cache] viveka27 Scripting Help 1 21/05/2013 03:31 PM


All times are GMT. The time now is 08:11 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.