SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 10/01/2018, 10:07 AM   #1
ConnorG
Little Clucker
 
Join Date: Jan 2018
Posts: 5
Reputation: 0
Post Warning 213: Tag mismatch and warning 202: number of arguments does not match definition

I need help, i have problems with this, can u guys help me pls?

Script:
Code:
CMD:handcuff(playerid, params[])
{
    new targetid;
    if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_GREY, "SU DUNG: /handcuff [Player ID]");
    if(IsPlayerConnected(targetid))
        {
            new Float:x, Float:y, Float:z;
               GetPlayerPos(playerid, x, y, z);
               if(IsPlayerInRangeOfPoint(targetid, 5.0, x, y, z))
                   {
                    new str[512];
                      new name[MAX_PLAYER_NAME];
                    GetPlayerName(playerid, name, sizeof(name));
                    new target[MAX_PLAYER_NAME];
                       GetPlayerName(targetid, target, sizeof(target));
                       format(str, sizeof(str), "You cuffed %s .",target);
                       SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
                       format(str, sizeof(str), "You have cuffed by %s!",name);
                       SendClientMessage(targetid, COLOR_LIGHTBLUE, str);
                       SetPlayerAttachedObject(targetid, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977,-81.700035, 0.891999, 1.000000, 1.168000);
                       SetPlayerSpecialAction(targetid,SPECIAL_ACTION_CUFFED);
                {
				    format(str, sizeof(str), "* %s take hands cuff out and cuffed %s .", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
					ProxDetectorS(30.0, playerid, str, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
				}
                      return 1;
                }

        }
    return 1;
}

CMD:unhandcuff(playerid, params[])
{

        new targetid;
        if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, "SU DUNG: /unhandcuff [Player ID]");
        if(IsPlayerConnected(targetid))
        {
            new Float:x, Float:y, Float:z;
               GetPlayerPos(playerid, x, y, z);
               if(IsPlayerInRangeOfPoint(targetid, 5.0, x, y, z))
                   {
                    if(!SetPlayerAttachedObject(targetid, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977,-81.700035, 0.891999, 1.000000, 1.168000))return SendClientMessage(playerid,-1,"ERROR: The player is not cuffed!");
                      SetPlayerSpecialAction(targetid,SPECIAL_ACTION_NONE);
                    new str[512];
                      new name[MAX_PLAYER_NAME];
                    GetPlayerName(playerid, name, sizeof(name));
                    new target[MAX_PLAYER_NAME];
                       GetPlayerName(targetid, target, sizeof(target));
                       format(str, sizeof(str), "You uncuffed for %s!",target);
                       SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
					   format(str, sizeof(str), "** %s uncuffed for %s", GetPlayerName(playerid), GetPlayerName(playerid));
					   NewProx(playerid, 0xC688D4AA, str, 30.0);
                       format(str, sizeof(str), "You have uncuffed by %s!",name);
                       SendClientMessage(targetid, COLOR_LIGHTBLUE, str);
						{
				    	format(str, sizeof(str), "* %s uncuffed for %s.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
						ProxDetectorS(30.0, playerid, str, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
						}
                      return 1;
                }

        }
        return 1;
}
Warning:
Code:
C:\Users\Administrator\Desktop\PG-RP.ORG\VGG\VGG\VGG-RP\filterscripts\oocchat.pwn(352) : warning 213: tag mismatch
C:\Users\Administrator\Desktop\PG-RP.ORG\VGG\VGG\VGG-RP\filterscripts\oocchat.pwn(352) : warning 202: number of arguments does not match definition
C:\Users\Administrator\Desktop\PG-RP.ORG\VGG\VGG\VGG-RP\filterscripts\oocchat.pwn(352) : warning 202: number of arguments does not match definition
C:\Users\Administrator\Desktop\PG-RP.ORG\VGG\VGG\VGG-RP\filterscripts\oocchat.pwn(352) : warning 202: number of arguments does not match definition
C:\Users\Administrator\Desktop\PG-RP.ORG\VGG\VGG\VGG-RP\filterscripts\oocchat.pwn(352) : warning 202: number of arguments does not match definition
C:\Users\Administrator\Desktop\PG-RP.ORG\VGG\VGG\VGG-RP\filterscripts\oocchat.pwn(381) : warning 202: number of arguments does not match definition
C:\Users\Administrator\Desktop\PG-RP.ORG\VGG\VGG\VGG-RP\filterscripts\oocchat.pwn(381) : warning 202: number of arguments does not match definition
C:\Users\Administrator\Desktop\PG-RP.ORG\VGG\VGG\VGG-RP\filterscripts\oocchat.pwn(381) : warning 202: number of arguments does not match definition
C:\Users\Administrator\Desktop\PG-RP.ORG\VGG\VGG\VGG-RP\filterscripts\oocchat.pwn(381) : warning 202: number of arguments does not match definition
C:\Users\Administrator\Desktop\PG-RP.ORG\VGG\VGG\VGG-RP\filterscripts\oocchat.pwn(387) : warning 213: tag mismatch
C:\Users\Administrator\Desktop\PG-RP.ORG\VGG\VGG\VGG-RP\filterscripts\oocchat.pwn(387) : warning 202: number of arguments does not match definition
C:\Users\Administrator\Desktop\PG-RP.ORG\VGG\VGG\VGG-RP\filterscripts\oocchat.pwn(387) : warning 202: number of arguments does not match definition
C:\Users\Administrator\Desktop\PG-RP.ORG\VGG\VGG\VGG-RP\filterscripts\oocchat.pwn(387) : warning 202: number of arguments does not match definition
C:\Users\Administrator\Desktop\PG-RP.ORG\VGG\VGG\VGG-RP\filterscripts\oocchat.pwn(387) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


14 Warnings.
Line 352:
Code:
ProxDetectorS(30.0, playerid, str, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
Line 381:

Code:
format(str, sizeof(str), "* %s take hands cuff out and cuffed %s .", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
Line 387:
Code:
ProxDetectorS(30.0, playerid, str, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ConnorG is offline   Reply With Quote
Old 10/01/2018, 02:37 PM   #2
pollo97
Big Clucker
 
pollo97's Avatar
 
Join Date: Sep 2011
Location: Italy
Posts: 83
Reputation: 4
Default Re: Warning 213: Tag mismatch and warning 202: number of arguments does not match definition

Can you show to me this function ?

Code:
ProxDetectorS
pollo97 is offline   Reply With Quote
Old 10/01/2018, 06:47 PM   #3
RogueDrifter
High-roller
 
RogueDrifter's Avatar
 
Join Date: Dec 2017
Location: SA-MP Drifting world.
Posts: 1,193
Reputation: 420
Default Re: Warning 213: Tag mismatch and warning 202: number of arguments does not match definition

Show ProxDetectorS AND GetPlayerNameEx
__________________
Quote:
Originally Posted by Andy
My anti cheat is still relevant *puts shades on* https://github.com/RogueDrifter/Anti_cheat_pack

[Github]:Link [Gists]:Link [Forum]:Link [Server]:Link [Discord]:Link

RogueDrifter is offline   Reply With Quote
Old 12/01/2018, 02:13 AM   #4
ConnorG
Little Clucker
 
Join Date: Jan 2018
Posts: 5
Reputation: 0
Default Re: Warning 213: Tag mismatch and warning 202: number of arguments does not match definition

GetPlayerNameEx
Code:
stock GetPlayerNameEx(playerid)
{
     new pName[25];
     GetPlayerName(playerid, pName, sizeof(pName));
     return pName;
}
ProxDetectorS
Code:
stock ProxDetectorS(playerid, color, const message[], Float:Range)
{
    new
		Float:_Position[  3], idx = 0
	;
    GetPlayerPos( playerid, _Position[0], _Position[1], _Position[2] );

    while(idx++ < MAX_PLAYERS && IsPlayerConnected(idx))
    {
        if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(idx) && IsPlayerInRangeOfPoint(idx, Range, _Position[0], _Position[1], _Position[2]))
        {
        	SendClientMessage(idx, color, message);
        }
    }
    return true;
}
ConnorG is offline   Reply With Quote
Old 12/01/2018, 02:19 AM   #5
ConnorG
Little Clucker
 
Join Date: Jan 2018
Posts: 5
Reputation: 0
Default Re: Warning 213: Tag mismatch and warning 202: number of arguments does not match definition

Quote:
Originally Posted by RogueDrifter View Post
Show ProxDetectorS AND GetPlayerNameEx
Can you help me pls?
ConnorG is offline   Reply With Quote
Old 12/01/2018, 02:32 AM   #6
RogueDrifter
High-roller
 
RogueDrifter's Avatar
 
Join Date: Dec 2017
Location: SA-MP Drifting world.
Posts: 1,193
Reputation: 420
Default Re: Warning 213: Tag mismatch and warning 202: number of arguments does not match definition

change
PHP Code:
ProxDetectorS(30.0playeridstrCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); 
to
PHP Code:
ProxDetectorS(playeridCOLOR_PURPLE,str,30.0); 
and
PHP Code:
format(strsizeof(str), "* %s take hands cuff out and cuffed %s ."GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid)); 
to
PHP Code:
new playername[30];
new 
otherplayername[30];
GetPlayerName(playerid,playername,sizeof(playername));
GetPlayerName(giveplayerid,otherplayername,sizeof(otherplayername));
format(strsizeof(str), "* %s take hands cuff out and cuffed %s ."playernameotherplayername); 
__________________
Quote:
Originally Posted by Andy
My anti cheat is still relevant *puts shades on* https://github.com/RogueDrifter/Anti_cheat_pack

[Github]:Link [Gists]:Link [Forum]:Link [Server]:Link [Discord]:Link

RogueDrifter 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
warning 202: number of arguments does not match definition xXGabyGabiXx Scripting Help 3 04/07/2017 12:01 PM
[Ajuda] warning 217: loose indentation, warning 202: number of arguments does not match definition NATANGameron Português/Portuguese 7 05/04/2017 12:36 AM
warning 202: number of arguments does not match definition PrednizoN Scripting Help 2 12/04/2016 10:41 AM
warning (7784) : warning 202: number of arguments does not match definition b0b Scripting Help 3 08/06/2014 05:26 PM
warning 202: number of arguments does not match definition nissan123 Help Archive 2 03/09/2010 05:45 AM


All times are GMT. The time now is 12:58 AM.


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