SA-MP Forums Archive
2 errors - 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: 2 errors (/showthread.php?tid=322792)



2 errors - lewismichaelbbc - 03.03.2012

pawn Код:
Z:\Users\lewismichaelbbc\Documents\Linux-Server\gamemodes\lewisrp.pwn(382) : warning 213: tag mismatch
Z:\Users\lewismichaelbbc\Documents\Linux-Server\gamemodes\lewisrp.pwn(383 -- 384) : error 001: expected token: ")", but found ";"
Here is the code:

pawn Код:
if(IsACopCar(vehicleid))
    {
        if(!PlayerInfo[playerid][pFaction] == 1) // Line 382  - Something wrong with this i think
        (
            SendClientMessage(playerid,COLOR_YELLOW, "You are not in the LSPD / FBI");
            RemovePlayerFromVehicle(playerid);
        }
        else
        {
            SendClientMessage(playerid, COLOR_YELLOW, "You have just entered a cop vehicle");
    }



Re: 2 errors - Walsh - 03.03.2012

pawn Код:
if(!PlayerInfo[playerid][pFaction] == 1)
This is wrong, the exclamation is not supposed to be there. This is the correct way.

pawn Код:
if(PlayerInfo[playerid][pFaction] != 1)
This says if the player's faction does not equal 1 then continue the code.


Re: 2 errors - Konstantinos - 03.03.2012

pawn Код:
if(!PlayerInfo[playerid][pFaction] == 1) // Line 382  - Something wrong with this i think
( // <-
It's
pawn Код:
if(!PlayerInfo[playerid][pFaction] == 1) // Line 382  - Something wrong with this i think
{ // <- "{"



Re: 2 errors - Walsh - 03.03.2012

Quote:
Originally Posted by Dwane
Посмотреть сообщение
pawn Код:
if(!PlayerInfo[playerid][pFaction] == 1) // Line 382  - Something wrong with this i think
( // <-
It's
pawn Код:
if(!PlayerInfo[playerid][pFaction] == 1) // Line 382  - Something wrong with this i think
{ // <- "{"
Holy shit, you have a good eye! I didn't even see that lmao.