[HELP] Else.... - 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: [HELP] Else.... (
/showthread.php?tid=166777)
[HELP] Else.... -
kOjOe - 09.08.2010
I got an error on the Else line
PHP код:
if(strcmp(cmd, "/rggo", true) == 0)
{
if(PlayerInfo[playerid] [pLeader] == 8)
{
SendClientMessage(playerid,COLOR_WHITE, "You've successfully opened the Gate. ");
else
{
SendClientMessage(playerid,COLOR_WHITE, "You are NOT a Racer'Z");
}
}
return 1;
}
When i compile it say this : error 029: invalid expression, assumed zero
-
kOjOe
Re: [HELP] Else.... -
(.Aztec); - 09.08.2010
pawn Код:
if(strcmp(cmd, "/rggo", true) == 0)
{
if(PlayerInfo[playerid] [pLeader] == 8)
{
SendClientMessage(playerid,COLOR_WHITE, "You've successfully opened the Gate. ");
}
else
{
SendClientMessage(playerid,COLOR_WHITE, "You are NOT a Racer'Z");
}
return 1;
}
You had an extra bracket, and was missing one.
Re: [HELP] Else.... -
Fj0rtizFredde - 09.08.2010
Try this
pawn Код:
if(strcmp(cmd, "/rggo", true) == 0)
{
if(PlayerInfo[playerid] [pLeader] == 8)
{
SendClientMessage(playerid,COLOR_WHITE, "You've successfully opened the Gate. ");
}
else
{
SendClientMessage(playerid,COLOR_WHITE, "You are NOT a Racer'Z");
}
return 1;
}
Re: [HELP] Else.... -
(.Aztec); - 09.08.2010
Response to the above poster:
pawn Код:
if(strcmp(cmd, "/rggo", true) == 0)
{
if(PlayerInfo[playerid] [pLeader] == 8)
{
SendClientMessage(playerid,COLOR_WHITE, "You've successfully opened the Gate. ");
}
else
{
SendClientMessage(playerid,COLOR_WHITE, "You are NOT a Racer'Z");
}
} <---
return 1;
}
That shouldn't be there. =p
EDIT: Seems like you've edited it. Yeah, both of our codes are the exact same thing. To the OP: Use either one.
Re: [HELP] Else.... -
kOjOe - 09.08.2010
Quote:
Originally Posted by (.Aztec);
pawn Код:
if(strcmp(cmd, "/rggo", true) == 0) { if(PlayerInfo[playerid] [pLeader] == 8) { SendClientMessage(playerid,COLOR_WHITE, "You've successfully opened the Gate. "); } else { SendClientMessage(playerid,COLOR_WHITE, "You are NOT a Racer'Z"); } return 1; }
You had an extra bracket, and was missing one.
|
Thank you ^^
Re: [HELP] Else.... -
Fj0rtizFredde - 09.08.2010
Quote:
Originally Posted by (.Aztec);
That shouldn't be there. =p
|
Yeah I saw that right when I clicked post reply :P
Re: [HELP] Else.... -
(.Aztec); - 09.08.2010
Quote:
Originally Posted by Fj0rtizFredde
Yeah I saw that right when I clicked post reply :P
|
Yeah, I noticed you edited your post. Just thought i'd point it out. =p