Tag mismatch - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Tag mismatch (
/showthread.php?tid=433839)
Tag mismatch -
Dzines4SAMP - 29.04.2013
I only have 1 warning, let me explain
Warning : warning 213: tag mismatch
pawn Код:
if (weaponid == 24) PlayerInfo[playerid][pDeagle] = 0;
Re: Tag mismatch -
MattyG - 29.04.2013
Show us the code around this line, as in the block it's inside
Re: Tag mismatch -
Dzines4SAMP - 29.04.2013
pawn Код:
public RemovePlayerWeapon(playerid, weaponid)
{
new plyWeapons[12];
new plyAmmo[12];
for(new slot = 0; slot != 12; slot++)
{
new wep, ammo;
GetPlayerWeaponData(playerid, slot, wep, ammo);
if(wep != weaponid)
{
GetPlayerWeaponData(playerid, slot, plyWeapons[slot], plyAmmo[slot]);
}
}
SafeResetPlayerWeapons(playerid);
for(new slot = 0; slot != 12; slot++)
{
SafeGivePlayerWeapon(playerid, plyWeapons[slot], plyAmmo[slot]);
}
if (weaponid == 23) PlayerInfo[playerid][pSDPistol] = 0;
if (weaponid == 24) PlayerInfo[playerid][pDeagle] = 0;
if (weaponid == 25) PlayerInfo[playerid][pShotgun] = 0;
if (weaponid == 29) PlayerInfo[playerid][pMP5] = 0;
if (weaponid == 30) PlayerInfo[playerid][pAK47] = 0;
if (weaponid == 31) PlayerInfo[playerid][pM4] = 0;
if (weaponid == 33) PlayerInfo[playerid][pRifle] = 0;
return 1;
}
Re: Tag mismatch -
Dzines4SAMP - 29.04.2013
Here's the part where it's declared
pawn Код:
new PlayerInfo[MAX_PLAYERS][pInfo];
No enums are related to it.
Re: Tag mismatch -
MattyG - 29.04.2013
That's your problem, you'll need a pInfo enum, with pDeagle etc.
Re: Tag mismatch -
RaZzZzoR - 29.04.2013
Код:
enum pInfo
{
pDeagle
};
Re: Tag mismatch -
MP2 - 30.04.2013
Show 'pDeagle' in the pInfo enum..