Empty Statement - Help - 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: Empty Statement - Help (
/showthread.php?tid=500439)
Empty Statement - Help -
Ciarannn - 13.03.2014
I am coding a Cop team for a gamemode i'm creating, but when I compile it im getting the error:
Код:
C:\Users\Ciaran\Desktop\CopChase.pwn(201) : error 036: empty statement
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
This is my code at the top:
Код:
new gTeam[MAX_PLAYERS];
#define TEAM_COP 1
#define TEAM_ROB 2
#define TEAM_NORMAL 3
And my code that its giving the error at:
Код:
if(strcmp(cmdtext,"/copcar",true) == 0)
{
if(gTeam[playerid] == TEAM_COP); //This line is where the error is occurring. Line 201.
new Float:X;
new Float:Y;
new Float:Z;
GetPlayerPos(playerid,X,Y,Z);
SendClientMessage(playerid, 0, "{126F94}A San Fierro Police car has been spawned next to you.");
CreateVehicle(597,X,Y+5,Z,1,0,1,90000);
return 1;
}
Could somebody help please?
Re: Empty Statement - Help -
Ciarannn - 13.03.2014
Sorry to bother, FIXED. The problem was the ; after the if, and to fix the error codes when taking that a way, I put a { after if, and at the end of code }. Thanks though.