Raised This Month: $64 Target: $400
 16% 

Solved Error: Argument type mismatch (argument 3)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Location: ISR
Old 06-26-2018 , 12:21   Error: Argument type mismatch (argument 3)
Reply With Quote #1

When I do not have this include, I'm not getting an error of argument.
Code:
#include <amxmisc>
->
PHP Code:
ErrorArgument type mismatch (argument 3)
Error: Function heading differs from prototype 
i know is something with arg1..



these error:
Code:
new arg[ 64 ], arg1[ 64 ], arg2[ 64 ]

	new player = cmd_target( client, arg, arg1, command )
	
	player = command != MULTI_CVAR && command != VOTEMAP ? cmd_target( client, arg, arg1, command ) : 0;
stock of cmd_target:
Code:
stock cmd_target( client, const arg[], const arg1[], command ) 
{
	if ( !equal( arg1, "" )
	|| command == T_TRANSFER
	|| command == CT_TRANSFER
	|| command == SPEC_TRANSFER
	|| command == REVIVE 
	|| command == BURY 
	|| command == UNBURY 
	|| command == SLAY 
	|| command == SLAP
	|| command == UBERSLAP
	|| command == DRUG
	|| command == UNDRUG
	|| command == FLASH 
	|| command == ROCKET
	|| command == FIRE )
	{
		
	new player = find_player( "bl",arg );

	if ( player ) 
	{
		if ( player != find_player( "blj",arg ) ) 
		{
			ColorChat( client, "^3Error^1: There are more than 1 player with that name" );
		
			return 0;
		}
	}

	else if ( ( player = find_player( "c",arg ) ) ==0 && arg[ 0 ] == '#' && arg[ 1 ] )
	{
		player = find_player( "k",str_to_num( arg[ 1 ] ) );
	}

	if ( !player ) 
	{	
		return 0;
	}

	return player;
	}
	return 0;
}
I am trying to block that commands can not be made on FLAG = A, but my way isnt working i can use command on flag A
PHP Code:
        if(tempid != id && !(get_user_flagstempid ) & ADMIN_IMMUNITY))
            
formatex(szTextcharsmax(szText), "%s |\r* - > %s"szNameszTest[Clip[tempid]]) 
__________________

Last edited by Fuck For Fun; 06-26-2018 at 21:33. Reason: Solved
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 06-26-2018 , 13:01   Re: Error: Argument type mismatch (argument 3)
Reply With Quote #2

Quote:
Originally Posted by Fuck For Fun View Post
When I do not have this include, I'm not getting an error of argument.
This is because you using cmd_target from amxmisc not from your plugin. Try to rename your stock bro
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar,get_pcvar_num(pCvar) ? 1); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Location: ISR
Old 06-26-2018 , 21:32   Re: Error: Argument type mismatch (argument 3)
Reply With Quote #3

Quote:
Originally Posted by ^SmileY View Post
This is because you using cmd_target from amxmisc not from your plugin. Try to rename your stock bro
OH My Mistake!!, thank you =]
__________________

Last edited by Fuck For Fun; 06-26-2018 at 21:32.
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
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

Forum Jump


All times are GMT -4. The time now is 09:04.


Powered by vBulletin®
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Theme made by Freecode