Tag Missmatch
#1

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 520 && !PlayerInfo[playerid][Rank] == RANK_AIRFORCE && !PlayerInfo[playerid][Rank] == RANK_LEGEND)
            {
                SendClientMessage(playerid, COLOR_RED, "You need to be the airforce to drive the Hydra!");//
                RemovePlayerFromVehicle(playerid);
            }
            else if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 425 && !PlayerInfo[playerid][Rank] == RANK_AIRFORCE && !PlayerInfo[playerid][Rank] == RANK_LEGEND)//
            {
                SendClientMessage(playerid, COLOR_RED, "You need to be the airforce to drive the Hunter!");
                RemovePlayerFromVehicle(playerid);
            }
            else if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 476 && !PlayerInfo[playerid][Rank] == RANK_AIRFORCE && !PlayerInfo[playerid][Rank] == RANK_LEGEND)//
            {
                SendClientMessage(playerid, COLOR_RED, "You need to be the airforce to drive the Rustler!");
                RemovePlayerFromVehicle(playerid);
            }
            else if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 432 && !PlayerInfo[playerid][Rank] == RANK_AIRFORCE && !PlayerInfo[playerid][Rank] == RANK_LEGEND)//
            {
                SendClientMessage(playerid, COLOR_RED, "You need to be a tanker to drive the Rhino!");
                RemovePlayerFromVehicle(playerid);
            }
        }
    }
    return 1;
}
Код:
C:\Documents and Settings\Ed\My Documents\SA-MP Virtual Army\Server\gamemodes\VirtualArmy.pwn(395) : warning 213: tag mismatch
C:\Documents and Settings\Ed\My Documents\SA-MP Virtual Army\Server\gamemodes\VirtualArmy.pwn(395) : warning 213: tag mismatch
C:\Documents and Settings\Ed\My Documents\SA-MP Virtual Army\Server\gamemodes\VirtualArmy.pwn(400) : warning 213: tag mismatch
C:\Documents and Settings\Ed\My Documents\SA-MP Virtual Army\Server\gamemodes\VirtualArmy.pwn(400) : warning 213: tag mismatch
C:\Documents and Settings\Ed\My Documents\SA-MP Virtual Army\Server\gamemodes\VirtualArmy.pwn(405) : warning 213: tag mismatch
C:\Documents and Settings\Ed\My Documents\SA-MP Virtual Army\Server\gamemodes\VirtualArmy.pwn(405) : warning 213: tag mismatch
C:\Documents and Settings\Ed\My Documents\SA-MP Virtual Army\Server\gamemodes\VirtualArmy.pwn(410) : warning 213: tag mismatch
C:\Documents and Settings\Ed\My Documents\SA-MP Virtual Army\Server\gamemodes\VirtualArmy.pwn(410) : warning 213: tag mismatch
Any ideas on how to fix this? Baiscally, there are two ranks, Airforce and Tanker, and there is also a special rank called Legend, the legend can do anythin without switching classes.
Reply
#2

Show me the lines!
Reply
#3

-_-

Those are the lines.
Reply
#4

U posted 30 lines, dude! Show me these with the errors...395, 400...
Reply
#5

Oh shit sorry man. Didnt realise.

*Facepalm.

I commented the lines what have tag miss matches
Reply
#6

There is something with COLOR_RED! Sure u defined it?
Reply
#7

Ofc I defined it.

Or it would of said.

Код:
error 017: undefined symbol "COLOR_RED"
Reply
#8

Remove all exclamation marks on those lines.
Reply
#9

The guy abouve is right. Sohuldn't it be like:

pawn Код:
PlayerInfo[playerid][Rank] != RANK_AIRFORCE
??
Reply
#10

Quote:
Originally Posted by Berlovan
Посмотреть сообщение
The guy abouve is right. Sohuldn't it be like:

pawn Код:
PlayerInfo[playerid][Rank] != RANK_AIRFORCE
??
That's what i was thinking of.
EDIT
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 520 && PlayerInfo[playerid][Rank] != RANK_AIRFORCE && PlayerInfo[playerid][Rank] != RANK_LEGEND)
            {
                SendClientMessage(playerid, COLOR_RED, "You need to be the airforce to drive the Hydra!");//
                RemovePlayerFromVehicle(playerid);
            }
            else if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 425 && PlayerInfo[playerid][Rank] != RANK_AIRFORCE && PlayerInfo[playerid][Rank] != RANK_LEGEND)//
            {
                SendClientMessage(playerid, COLOR_RED, "You need to be the airforce to drive the Hunter!");
                RemovePlayerFromVehicle(playerid);
            }
            else if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 476 && PlayerInfo[playerid][Rank] != RANK_AIRFORCE && PlayerInfo[playerid][Rank] != RANK_LEGEND)//
            {
                SendClientMessage(playerid, COLOR_RED, "You need to be the airforce to drive the Rustler!");
                RemovePlayerFromVehicle(playerid);
            }
            else if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 432 && PlayerInfo[playerid][Rank] != RANK_AIRFORCE && PlayerInfo[playerid][Rank] != RANK_LEGEND)//
            {
                SendClientMessage(playerid, COLOR_RED, "You need to be a tanker to drive the Rhino!");
                RemovePlayerFromVehicle(playerid);
            }
        }
    }
    return 1;
}
Reply
#11

Is it working now ?

Offtopic:
You just stole my reputation. Good work tho.
Reply
#12

Ok, I't works. Thanks guys! You all got stars! :P
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)