SA-MP Forums Archive
What Is wrong In This Code - 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: What Is wrong In This Code (/showthread.php?tid=610521)



What Is wrong In This Code - CarRamper - 25.06.2016

Код:
public OnPlayerRequestClass(playerid, classid)
{
if gTeam[playerid] == TEAM_COP);
{
GameTextForPlayer(playerid, "Police", 5000, 2);
}
Want To Show A Text Of Police On Skin Selection If they are cop

error
Код:
C:\Users\Anurag\Desktop\Most Wanted Cops and Robbers v1.1\gamemodes\MWCNR.pwn(3485) : error 001: expected token: "*then", but found ")"
C:\Users\Anurag\Desktop\Most Wanted Cops and Robbers v1.1\gamemodes\MWCNR.pwn(3485) : error 029: invalid expression, assumed zero
Error Line
Код:
if gTeam[playerid] == TEAM_COP);



Re: What Is wrong In This Code - IceBilizard - 25.06.2016

PHP код:
if(gTeam[playerid] == TEAM_COP); 



Re: What Is wrong In This Code - CarRamper - 25.06.2016

Getting Error On The Same Like
Код:
error 036: empty statement



Re: What Is wrong In This Code - CarRamper - 25.06.2016

Fixed It By Removing ";" From "if(gTeam[playerid] == TEAM_COP);"


Re: What Is wrong In This Code - Lynn - 25.06.2016

If statements will never use ';' at the end.