06.03.2012, 07:56
Hello.
I am creating some fun commands for the admins on my server. I created a /infammon command , but when i try to compile , it's says that there is 6 errors of "tag mismatch"
Here is where the error is :
And here is the error i get :
C:\DOCUME~1\HP_ADM~1\Bureau\SAMPSE~1\GAMEMO~1\test .pwn(223) : warning 213: tag mismatch
C:\DOCUME~1\HP_ADM~1\Bureau\SAMPSE~1\GAMEMO~1\test .pwn(224) : warning 213: tag mismatch
C:\DOCUME~1\HP_ADM~1\Bureau\SAMPSE~1\GAMEMO~1\test .pwn(229) : warning 213: tag mismatch
C:\DOCUME~1\HP_ADM~1\Bureau\SAMPSE~1\GAMEMO~1\test .pwn(230) : warning 213: tag mismatch
C:\DOCUME~1\HP_ADM~1\Bureau\SAMPSE~1\GAMEMO~1\test .pwn(235) : warning 213: tag mismatch
C:\DOCUME~1\HP_ADM~1\Bureau\SAMPSE~1\GAMEMO~1\test .pwn(236) : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
6 Warnings.
Well , it's not errors , it's just warnings , but i really want to know why there are here.
I am creating some fun commands for the admins on my server. I created a /infammon command , but when i try to compile , it's says that there is 6 errors of "tag mismatch"
Here is where the error is :
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/deathmatch", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid, 1307.5884,-1158.6796,23.8281);
SendClientMessage(playerid, COLOR_GREEN, "You have been teleported to the DeathMatch Area!");
if (GetPlayerSkin(0))
{
GivePlayerWeapon(playerid, 22, 50);
GivePlayerWeapon(playerid, 18, 5);
}
if (GetPlayerSkin(1))
{
GivePlayerWeapon(playerid, 25, 30);
GivePlayerWeapon(playerid, 24, 40);
}
if (GetPlayerSkin(2))
{
GivePlayerWeapon(playerid, 23, 40);
GivePlayerWeapon(playerid, 26, 35);
}
return 1;
}
if (strcmp("/safearea", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid, 701.5940,-519.2322,16.3302);
ResetPlayerWeapons(playerid);
SendClientMessage(playerid, COLOR_GREEN, "You have been teleported to the Safe Area!");
return 1;
}
if (strcmp("/buyarmor", cmdtext, true, 10) == 0)
{
if (GetPlayerMoney(playerid) <1000)
{
SendClientMessage(playerid, COLOR_GREY, "You need at least 1000 bucks to buy an armor!");
}
if (GetPlayerMoney(playerid) >1000)
{
GivePlayerMoney(playerid, -1000);
SetPlayerArmour(playerid, 100);
SendClientMessage(playerid, COLOR_YELLOW, "Thanks you for buying an 1000 bucks worth Armor!");
}
return 1;
}
if (strcmp("/kill", cmdtext, true, 10) ==0)
{
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, COLOR_YELLOW, "You commited a suicide.");
return 1;
}
if (strcmp("/godon", cmdtext, true, 10) ==0)
{
if (!IsPlayerAdmin(playerid))
{
SendClientMessage(playerid, COLOR_GREY, "You don't have access to this command.");
}
if (IsPlayerAdmin(playerid))
{
SetPlayerHealth(playerid, INFINITE);
SendClientMessage(playerid, COLOR_YELLOW, "You are now GodMode.");
}
return 1;
}
if (strcmp("/godoff", cmdtext, true, 10) ==0)
{
if (!IsPlayerAdmin(playerid))
{
SendClientMessage(playerid, COLOR_GREY, "You don't have access to this command.");
}
if (IsPlayerAdmin(playerid))
{
new Float:health;
GetPlayerHealth(playerid, health);
if (health < 100.00000001)
{
SendClientMessage(playerid, COLOR_GREY, "Your GodMode is already disabled.");
}
if (health == INFINITE)
{
SetPlayerHealth(playerid, 99.9);
SendClientMessage(playerid, COLOR_YELLOW, "You are no longer GodMode.");
}
}
return 1;
}
if (strcmp("/infammon", cmdtext, true, 10) ==0)
{
if(!IsPlayerAdmin(playerid))
{
SendClientMessage(playerid, COLOR_GREY, "You don't have access to this command.");
}
if(IsPlayerAdmin(playerid))
{
if (GetPlayerAmmo(playerid) == INFINITE)
{
SendClientMessage(playerid, COLOR_GREY, "You already have Infinite Ammo activated.");
}
else
{
if (GetPlayerSkin(0))
{
SetPlayerAmmo(playerid, 22, INFINITE);
SetPlayerAmmo(playerid, 18, INFINITE);
SendClientMessage(playerid, COLOR_YELLOW, "You have now Infinite Ammo.");
}
if (GetPlayerSkin(1))
{
SetPlayerAmmo(playerid, 25, INFINITE);
SetPlayerAmmo(playerid, 24, INFINITE);
SendClientMessage(playerid, COLOR_YELLOW, "You have now Infinite Ammo.");
}
if (GetPlayerSkin(2))
{
SetPlayerAmmo(playerid, 23, INFINITE);
SetPlayerAmmo(playerid, 26, INFINITE);
SendClientMessage(playerid, COLOR_YELLOW, "You have now Infinite Ammo.");
}
}
}
return 1;
}
return 0;
}
C:\DOCUME~1\HP_ADM~1\Bureau\SAMPSE~1\GAMEMO~1\test .pwn(223) : warning 213: tag mismatch
C:\DOCUME~1\HP_ADM~1\Bureau\SAMPSE~1\GAMEMO~1\test .pwn(224) : warning 213: tag mismatch
C:\DOCUME~1\HP_ADM~1\Bureau\SAMPSE~1\GAMEMO~1\test .pwn(229) : warning 213: tag mismatch
C:\DOCUME~1\HP_ADM~1\Bureau\SAMPSE~1\GAMEMO~1\test .pwn(230) : warning 213: tag mismatch
C:\DOCUME~1\HP_ADM~1\Bureau\SAMPSE~1\GAMEMO~1\test .pwn(235) : warning 213: tag mismatch
C:\DOCUME~1\HP_ADM~1\Bureau\SAMPSE~1\GAMEMO~1\test .pwn(236) : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
6 Warnings.
Well , it's not errors , it's just warnings , but i really want to know why there are here.


