SA-MP Forums Archive
Tag Missmatch - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Tag Missmatch (/showthread.php?tid=273683)



Tag Missmatch - Odyssey - 02.08.2011

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.


AW: Tag Missmatch - samtey - 02.08.2011

Show me the lines!


Re: Tag Missmatch - Odyssey - 02.08.2011

-_-

Those are the lines.


AW: Tag Missmatch - samtey - 02.08.2011

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


Re: Tag Missmatch - Odyssey - 02.08.2011

Oh shit sorry man. Didnt realise.

*Facepalm.

I commented the lines what have tag miss matches


AW: Tag Missmatch - samtey - 02.08.2011

There is something with COLOR_RED! Sure u defined it?


Re: Tag Missmatch - Odyssey - 02.08.2011

Ofc I defined it.

Or it would of said.

Код:
error 017: undefined symbol "COLOR_RED"



Re: Tag Missmatch - Stylock - 02.08.2011

Remove all exclamation marks on those lines.


Re: Tag Missmatch - sleepysnowflake - 02.08.2011

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

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


Re: Tag Missmatch - FireCat - 02.08.2011

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;
}



Re: Tag Missmatch - sleepysnowflake - 02.08.2011

Is it working now ?

Offtopic:
You just stole my reputation. Good work tho.


Re: Tag Missmatch - Odyssey - 02.08.2011

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