How can i fix this 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How can i fix this errors (
/showthread.php?tid=89150)
How can i fix this errors -
Battlaman - 31.07.2009
sorry wrong place..
Re: How can i fix this errors -
refshal - 31.07.2009
1. Ask in the scripting discussion next time.
2.
pawn Код:
if(gTeam[playerid] == TEAM_BLUE)
{
SendClientMessage(playerid, COLOR_DBLUE, "You are not a cop");
return 1;
}
Re: How can i fix this errors -
Battlaman - 31.07.2009
Quote:
Originally Posted by еddy
1. Ask in the scripting discussion next time.
2.
pawn Код:
if (gTeam[playerid] == TEAM_BLUE) { SendClientMessage(playerid, COLOR_DBLUE, "You are not a cop") return 1; }
|
ty
Re: How can i fix this errors -
Daem - 31.07.2009
Quote:
Originally Posted by Battleman
How can i fix this errors:
Errors:
Quote:
-error 001: expected token: ")", but found "return"
-warning 215: expression has no effect
-error 029: invalid expression, assumed zero
2 Errors.
|
Code:
Quote:
if (gTeam[playerid] == TEAM_BLUE) (SendClientMessage(playerid, COLOR_DBLUE, "You are not a cop") return 1;
|
|
Код:
if(gTeam[playerid != /*check if the player is NOT at the 'blue team' */ TEAM_BLUE { SendClientMessage(playerid, COLOR_DBLUE, "You are not a cop"); }
Код:
or
Код:
if(gTeam[playerid] == TEAM_BLUE)
{
//do something here
} else {
SendClientMessage(playerid, COLOR_DBLUE, "You are not a cop");
}
eddy
Quote:
Originally Posted by еddy
1. Ask in the scripting discussion next time.
2.
pawn Код:
if(gTeam[playerid] == TEAM_BLUE){ SendClientMessage(playerid, COLOR_DBLUE, "You are not a cop"); return 1;}
|
wtf? that is wrong. its: if player is a cop > send him "you are not a cop"..
Re: How can i fix this errors -
refshal - 31.07.2009
Quote:
Originally Posted by Battleman
Quote:
Originally Posted by еddy
1. Ask in the scripting discussion next time.
2.
pawn Код:
if (gTeam[playerid] == TEAM_BLUE) { SendClientMessage(playerid, COLOR_DBLUE, "You are not a cop") return 1; }
|
ty
|
Look at my post again, I edited it. I forgot a semicolon.
EDIT: @Daem: You don't know what team blue is... And he just missed a slash.