Tag Miss Match
#1

im getting this error , kindly help me !

ERROR : Tag Mismatch ( Screenshot in attachment )


Код:
CMD:ddm ( playerid )
{
	if ( PlayerInfo[playerid][inDM] == 1 ) return SendClientMessage( playerid, -1, ""RED"ERROR: "GREY"You are 
        already in a DM arena! Type /leave to exit!" );
	PlayerInfo[playerid][inDM] = 1;
	PlayerInfo[playerid][inMini] = 1;
	PlayerInfo[playerid][inDMZone] = 3;
	gMINIPlayers++;
	GameTextForPlayer(playerid, "~r~Deagle DM!", 2000, 3);
	SendClientMessage(playerid, COLOR_FIREBRICK, "** Welcome to Deagle DM!" );
	new Float:RandomSpawns[][] =
	{
               {49,231.6420,143.7800,1003.0234,5.15950,},
		{49,252.1088,185.7353,1008.1719,356.84330,},
		{49,298.6837,173.9480,1007.1719,79.81210,},
		{49,257.7563,170.8487,1003.0234,7.18100,} // "ITS SHOWING ERROR FOR THESE FOUR SPAWN 
                 PLACES."
	};
	if (IsPlayerInAnyVehicle(playerid))
	{
	    RemovePlayerFromVehicle(playerid);
	}
	new Random = random(sizeof(RandomSpawns));
	SetPlayerPosition(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], 
        RandomSpawns[Random][2], RandomSpawns[Random][3]);
	SetPlayerVirtualWorld(playerid, 1);
	SetCameraBehindPlayer(playerid);
	SetPlayerTeam(playerid, playerid);
	ResetPlayerWeapons(playerid);
	SetPlayerHealth(playerid, 100.0);
	if ( PlayerInfo[playerid][VIP] == 1 )
	{
		SetPlayerArmour(playerid, 100.0);
	}
	GivePlayerWeapon(playerid, 24, 99999);

	new str[128];
	format(str, sizeof(str), ""GREEN":: {%06x}%s(%d) "TELEPORTBLUE"teleported to Deagle DM (/ddm)!", 
        (GetPlayerColor(playerid) >>> 8), GetName(playerid), playerid);
	SendClientMessageToAll( -1, str );
	return 1;
}
Reply
#2

Код:
{49,231.6420,143.7800,1003.0234,5.15950,},
{49,252.1088,185.7353,1008.1719,356.84330,},
{49,298.6837,173.9480,1007.1719,79.81210,},
{49,257.7563,170.8487,1003.0234,7.18100,}
Edit:
Why you need 49 before each coordinates?
You should remove them too and last float also because random spawns uses this:
Код:
Float:x, Float:y, Float:z
Everything you need to remove I marked as red.
And I would like to suggest you to put those random spawns on top of your script under #includes
Reply
#3

PHP код:
enum 
    r_spawn
    
{
        
skinid,
        
Float:x,
        
Float:y,
        
Float:z,
        
Float:angle
    
};
static const
    
Float:RandomSpawns[][r_spawn] =
    {
        {
49231.6420143.78001003.02345.15950},
        {
49252.1088185.73531008.1719356.84330},
        {
49298.6837173.94801007.171979.81210},
        {
49257.7563170.84871003.02347.18100
    };
new
    
Random random(sizeof(RandomSpawns));
SetPlayerSkin(playeridRandomSpawns[Random][0]);
SetPlayerPos(playeridRandomSpawns[Random][1], RandomSpawns[Random][2], RandomSpawns[Random][3]);
SetPlayerFacingAngle(playeridRandomSpawns[Random][4]); 
Reply
#4

Quote:
Originally Posted by TomRedlake
Посмотреть сообщение
Код:
{49,231.6420,143.7800,1003.0234,5.15950,},
{49,252.1088,185.7353,1008.1719,356.84330,},
{49,298.6837,173.9480,1007.1719,79.81210,},
{49,257.7563,170.8487,1003.0234,7.18100,}
Edit:
Why you need 49 before each coordinates?
You should remove them too and last float also because random spawns uses this:
Код:
Float:x, Float:y, Float:z
Everything you need to remove I marked as red.
And I would like to suggest you to put those random spawns on top of your script under #includes
Thanks that worked !

But now it's showing this error :: error 032: array index out of bounds (variable "RandomSpawns")

Код:
SetPlayerPosition(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2], RandomSpawns[Random][3]);
Reply
#5

Код:
SetPlayerPosition(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2], RandomSpawns[Random][3]);
Last one you should remove
Reply
#6

Quote:
Originally Posted by TomRedlake
Посмотреть сообщение
Код:
SetPlayerPosition(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2], RandomSpawns[Random][3]);
Last one you should remove
Getting this error now )_) : warning 202: number of arguments does not match definition
Reply
#7

Which line?
Reply
#8

Quote:
Originally Posted by TomRedlake
Посмотреть сообщение
Which line?
this

Код:
SetPlayerPosition(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
Reply
#9

Show function SetPlayerPosition
Reply
#10

Quote:
Originally Posted by m1n1vv
Посмотреть сообщение
Show function SetPlayerPosition
Код:
SetPlayerPosition(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1]
,RandomSpawns[Random][2]);
        SetPlayerVirtualWorld(playerid, 1);
	SetCameraBehindPlayer(playerid);
	SetPlayerTeam(playerid, playerid);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)