Tag mismatch
#1

I only have 1 warning, let me explain

Warning : warning 213: tag mismatch

pawn Код:
if (weaponid == 24) PlayerInfo[playerid][pDeagle] = 0;
Reply
#2

Show us the code around this line, as in the block it's inside
Reply
#3

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;
}
Reply
#4

Here's the part where it's declared

pawn Код:
new PlayerInfo[MAX_PLAYERS][pInfo];
No enums are related to it.
Reply
#5

That's your problem, you'll need a pInfo enum, with pDeagle etc.
Reply
#6

Код:
enum pInfo
{
pDeagle
};
Reply
#7

Show 'pDeagle' in the pInfo enum..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)