AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Solved Error: Argument type mismatch (argument 3) (https://forums.alliedmods.net/showthread.php?t=308590)

Fuck For Fun 06-26-2018 11:21

Error: Argument type mismatch (argument 3)
 
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]]) 


^SmileY 06-26-2018 12:01

Re: Error: Argument type mismatch (argument 3)
 
Quote:

Originally Posted by Fuck For Fun (Post 2599384)
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

Fuck For Fun 06-26-2018 20:32

Re: Error: Argument type mismatch (argument 3)
 
Quote:

Originally Posted by ^SmileY (Post 2599393)
This is because you using cmd_target from amxmisc not from your plugin. Try to rename your stock bro

OH My Mistake!!, thank you =]


All times are GMT -4. The time now is 12:44.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.