Bunch of warnings for no reason.
#1

I've getting a 15 warnings of tag mismatch in my gamemode when there is no tag mismatch at all in the snippet causing the warnings. I've checked my code for any mistakes and also compiled the snippet on my C compiler with no errors or warnings. I'll also would like to know if there's a way to suppress the warnings so they don't show when I compile my gamemode. Thank you for your time.

Here's the snippet cause the warnings in Pawno
pawn Код:
enum WeaponName {
    Brass_Knuckles          = 1,    Golf_Club               = 2,    Nite_Stick              = 3,
    Knife                   = 4,    Baseball_Bat            = 5,    Shovel                  = 6,
    Pool_Cue                = 7,    Katana                  = 8,    Chainsaw                = 9,
    Purple_Dildo            = 10,   Small_White_Vibrator    = 11,   Large_White_Vibrator    = 12,
    Silver_Vibrator         = 13,   Flowers                 = 14,   Cane                    = 15,
    Grenade                 = 16,   Tear_Gas                = 17,   Molotov_Cocktail        = 18,
    Pistol_9mm              = 22,   Silenced_9mm            = 23,   Desert_Eagle            = 24,
    Shotgun                 = 25,   Sawnoff_Shotgun         = 26,   Combat_Shotgun          = 27,
    Uzi                     = 28,   MP5                     = 29,   AK_47                   = 30,
    M4                      = 31,   Tec9                    = 32,   Country_Rifle           = 33,
    Sniper_Rifle            = 34,   Rocket_Launcher         = 35,   HS_Rocket_Launcher      = 36,
    Flamethrower            = 37,   Minigun                 = 38
};

new WeaponsPolice[5][3][2] = {
    { { M4,         700 }, { Combat_Shotgun,    400 }, { Desert_Eagle,      500 } }, // Army    [Line: 49]
    { { MP5,        500 }, { AK_47,             600 }, { Sniper_Rifle,      200 } }, // CIA     [Line: 50]
    { { MP5,        500 }, { Desert_Eagle,      200 }, { Shotgun,           300 } }, // FBI     [Line: 51]
    { { Uzi,        400 }, { Combat_Shotgun,    500 }, { Sniper_Rifle,      300 } }, // SWAT    [Line: 52]
    { { Pistol_9mm, 500 }, { Shotgun,           300 }, { Tec9,              300 } }  // Police  [Line: 53]
};

public OnPlayerSpawn(playerid){
    for(new i = 0; 3 > i; i++)
        GivePlayerWeapon(playerid, WeaponsPolice[0][i][0], WeaponsPolice[0][i][1]);

    return 1;
}
The warnings:
pawn Код:
Server\gamemodes\las_venturas_gamemode.pwn(49) : warning 213: tag mismatch
Server\gamemodes\las_venturas_gamemode.pwn(49) : warning 213: tag mismatch
Server\gamemodes\las_venturas_gamemode.pwn(49) : warning 213: tag mismatch
Server\gamemodes\las_venturas_gamemode.pwn(50) : warning 213: tag mismatch
Server\gamemodes\las_venturas_gamemode.pwn(50) : warning 213: tag mismatch
Server\gamemodes\las_venturas_gamemode.pwn(50) : warning 213: tag mismatch
Server\gamemodes\las_venturas_gamemode.pwn(51) : warning 213: tag mismatch
Server\gamemodes\las_venturas_gamemode.pwn(51) : warning 213: tag mismatch
Server\gamemodes\las_venturas_gamemode.pwn(51) : warning 213: tag mismatch
Server\gamemodes\las_venturas_gamemode.pwn(52) : warning 213: tag mismatch
Server\gamemodes\las_venturas_gamemode.pwn(52) : warning 213: tag mismatch
Server\gamemodes\las_venturas_gamemode.pwn(52) : warning 213: tag mismatch
Server\gamemodes\las_venturas_gamemode.pwn(53) : warning 213: tag mismatch
Server\gamemodes\las_venturas_gamemode.pwn(53) : warning 213: tag mismatch
Server\gamemodes\las_venturas_gamemode.pwn(53) : warning 213: tag mismatch
Reply
#2

pawn Код:
enum WeaponName
{
    Brass_Knuckles          = 1,    Golf_Club               = 2,    Nite_Stick              = 3,
    Knife                   = 4,    Baseball_Bat            = 5,    Shovel                  = 6,
    Pool_Cue                = 7,    Katana                  = 8,    Chainsaw                = 9,
    Purple_Dildo            = 10,   Small_White_Vibrator    = 11,   Large_White_Vibrator    = 12,
    Silver_Vibrator         = 13,   Flowers                 = 14,   Cane                    = 15,
    Grenade                 = 16,   Tear_Gas                = 17,   Molotov_Cocktail        = 18,
    Pistol_9mm              = 22,   Silenced_9mm            = 23,   Desert_Eagle            = 24,
    Shotgun                 = 25,   Sawnoff_Shotgun         = 26,   Combat_Shotgun          = 27,
    Uzi                     = 28,   MP5                     = 29,   AK_47                   = 30,
    M4                      = 31,   Tec9                    = 32,   Country_Rifle           = 33,
    Sniper_Rifle            = 34,   Rocket_Launcher         = 35,   HS_Rocket_Launcher      = 36,
    Flamethrower            = 37,   Minigun                 = 38
};

new WeaponsPolice[5][3][2] = {
    { { M4,         700 }, { Combat_Shotgun,    400 }, { Desert_Eagle,      500 } }, // Army    [Line: 49]
    { { MP5,        500 }, { AK_47,             600 }, { Sniper_Rifle,      200 } }, // CIA     [Line: 50]
    { { MP5,        500 }, { Desert_Eagle,      200 }, { Shotgun,           300 } }, // FBI     [Line: 51]
    { { Uzi,        400 }, { Combat_Shotgun,    500 }, { Sniper_Rifle,      300 } }, // SWAT    [Line: 52]
    { { Pistol_9mm, 500 }, { Shotgun,           300 }, { Tec9,              300 } }  // Police  [Line: 53]
};

public OnPlayerSpawn(playerid){
    for(new i = 0; 3 > i; i++)
        GivePlayerWeapon(playerid, WeaponsPolice[0][i][0], WeaponsPolice[0][i][1]);
        }
    return 1;
}
Reply
#3

Thanks, but you forgot to opening curly brace after the conditional statement of the for loop.
pawn Код:
for(new i = 0; 3 > i; i++) {
        GivePlayerWeapon(playerid, WeaponsPolice[0][i][0], WeaponsPolice[0][i][1]);
}
Thanks for your help, but that still does not solve my problem.
Reply
#4

I've added the weapons for the civilians with the same format as the police weapons, and now instead of having 15 warnings for tag mismatch, I get 33 warnings for tag mismatch. When I run my gamemode in my local server, both Law Enforcements and Civilians receive their weapons with no problem.

pawn Код:
new WeaponsCivilian[6][3][2] = {
    { { Pistol_9mm,     400 }, { Silenced_9mm,      400 }, { Desert_Eagle,      400 } },
    { { Uzi,            400 }, { MP5,               400 }, { Tec9,              400 } },
    { { Shotgun,        400 }, { Sawnoff_Shotgun,   400 }, { Combat_Shotgun,    400 } },
    { { AK_47,          400 }, { M4,                400 }, { Sniper_Rifle,      400 } },
    { { Country_Rifle,  400 }, { Katana,            1   }, { Baseball_Bat,      1   } },
    { { Shovel,         1   }, { Pool_Cue,          1   }, { Cane,              1   } }
};

OnPlayerSpawn(playerid){
    new randPistol;
    new randSMG;
    new randLastWep[2];

    randPistol      = random(3);
    randSMG         = random(3);
    randLastWep[0]  = random(3) + 3;
    randLastWep[1]  = random(3);

    GivePlayerWeapon(playerid, WeaponsCivilian[0][randPistol][0], WeaponsCivilian[0][randPistol][1]);
    GivePlayerWeapon(playerid, WeaponsCivilian[1][randSMG][0], WeaponsCivilian[1][randSMG][1]);
    GivePlayerWeapon(playerid, WeaponsCivilian[randLastWep[0]][randLastWep[1]][0], WeaponsCivilian[randLastWep[0]][randLastWep[1]][1]);

    return 1;
}
The warnings
pawn Код:
Server\gamemodes\LVCWF.pwn(49) : warning 213: tag mismatch
Server\gamemodes\LVCWF.pwn(49) : warning 213: tag mismatch
Server\gamemodes\LVCWF.pwn(49) : warning 213: tag mismatch
Server\gamemodes\LVCWF.pwn(50) : warning 213: tag mismatch
Server\gamemodes\LVCWF.pwn(50) : warning 213: tag mismatch
Server\gamemodes\LVCWF.pwn(50) : warning 213: tag mismatch
Server\gamemodes\LVCWF.pwn(51) : warning 213: tag mismatch
Server\gamemodes\LVCWF.pwn(51) : warning 213: tag mismatch
Server\gamemodes\LVCWF.pwn(51) : warning 213: tag mismatch
Server\gamemodes\LVCWF.pwn(52) : warning 213: tag mismatch
Server\gamemodes\LVCWF.pwn(52) : warning 213: tag mismatch
Server\gamemodes\LVCWF.pwn(52) : warning 213: tag mismatch
Server\gamemodes\LVCWF.pwn(53) : warning 213: tag mismatch
Server\gamemodes\LVCWF.pwn(53) : warning 213: tag mismatch
Server\gamemodes\LVCWF.pwn(53) : warning 213: tag mismatch
Server\gamemodes\LVCWF.pwn(56) : warning 213: tag mismatch
Server\gamemodes\LVCWF.pwn(56) : warning 213: tag mismatch
Server\gamemodes\LVCWF.pwn(56) : warning 213: tag mismatch
Server\gamemodes\LVCWF.pwn(57) : warning 213: tag mismatch
Server\gamemodes\LVCWF.pwn(57) : warning 213: tag mismatch
Server\gamemodes\LVCWF.pwn(57) : warning 213: tag mismatch
Server\gamemodes\LVCWF.pwn(58) : warning 213: tag mismatch
Server\gamemodes\LVCWF.pwn(58) : warning 213: tag mismatch
Server\gamemodes\LVCWF.pwn(58) : warning 213: tag mismatch
Server\gamemodes\LVCWF.pwn(59) : warning 213: tag mismatch
Server\gamemodes\LVCWF.pwn(59) : warning 213: tag mismatch
Server\gamemodes\LVCWF.pwn(59) : warning 213: tag mismatch
Server\gamemodes\LVCWF.pwn(60) : warning 213: tag mismatch
Server\gamemodes\LVCWF.pwn(60) : warning 213: tag mismatch
Server\gamemodes\LVCWF.pwn(60) : warning 213: tag mismatch
Server\gamemodes\LVCWF.pwn(61) : warning 213: tag mismatch
Server\gamemodes\LVCWF.pwn(61) : warning 213: tag mismatch
Server\gamemodes\LVCWF.pwn(61) : warning 213: tag mismatch
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase

33 Warnings.
Reply
#5

pawn Код:
const
    Brass_Knuckles          = 1,    Golf_Club               = 2,    Nite_Stick              = 3,
    Knife                   = 4,    Baseball_Bat            = 5,    Shovel                  = 6,
    Pool_Cue                = 7,    Katana                  = 8,    Chainsaw                = 9,
    Purple_Dildo            = 10,   Small_White_Vibrator    = 11,   Large_White_Vibrator    = 12,
    Silver_Vibrator         = 13,   Flowers                 = 14,   Cane                    = 15,
    Grenade                 = 16,   Tear_Gas                = 17,   Molotov_Cocktail        = 18,
    Pistol_9mm              = 22,   Silenced_9mm            = 23,   Desert_Eagle            = 24,
    Shotgun                 = 25,   Sawnoff_Shotgun         = 26,   Combat_Shotgun          = 27,
    Uzi                     = 28,   MP5                     = 29,   AK_47                   = 30,
    M4                      = 31,   Tec9                    = 32,   Country_Rifle           = 33,
    Sniper_Rifle            = 34,   Rocket_Launcher         = 35,   HS_Rocket_Launcher      = 36,
    Flamethrower            = 37,   Minigun                 = 38
;
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)