[HELP] Else....
#1

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
Reply
#2

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.
Reply
#3

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;
}
Reply
#4

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.
Reply
#5

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 ^^
Reply
#6

Quote:
Originally Posted by (.Aztec);
Посмотреть сообщение
That shouldn't be there. =p
Yeah I saw that right when I clicked post reply :P
Reply
#7

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)