Whats wrong with this ?
#1

I'm pretty sure I messed up on this... Anyone ?

pawn Код:
CMD:joingang(playerid,params[])
{
    if( PlayerInfo[playerid][pMember] >= 3 || PlayerInfo[playerid][pFMember] != 255 || PlayerInfo[playerid][pLeader] >= 3 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 && PlayerInfo[playerid][pDivision] >= 3 || PlayerInfo[playerid][pMember] == 2 && PlayerInfo[playerid][pDivision] == 1)
    {
        SendClientMessageEx(playerid, COLOR_WHITE, "You can't accept this invite as you're already in a family/faction.");
    }
        if (PlayerInfo[playerid][pLevel] < 2)
        {
            SendClientMessageEx(playerid, COLOR_GRAD1, "You must be at least level 2.");
        }
            if(IsPlayerInRangeOfPoint(playerid,3.0,2489.9746,-1691.7869,14.7656)) //Grove Street
            {
                PlayerInfo[playerid][pFMember] = 0;
                PlayerInfo[playerid][pRank] = 1;
                SendClientMessageEx(playerid, COLOR_LIGHTBLUE,"You have successfully joined Grove Street Families (Public Gang)! Remember this is a public gang!");
                SaveFamilies();
            }
            else
            {
                SendClientMessageEx(playerid, COLOR_WHITE, "Your not in range of a gang point to join!");
            }
    }
    return 1;
}
Reply
#2

share us some information about the problem? will be alot quicker to fix then.
Reply
#3

warning 217: loose indentation
error 010: invalid function or declaration
Reply
#4

Anyone ?
Reply
#5

pawn Код:
CMD:joingang(playerid,params[])
{
    if( PlayerInfo[playerid][pMember] >= 3 || PlayerInfo[playerid][pFMember] != 255 || PlayerInfo[playerid][pLeader] >= 3 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 && PlayerInfo[playerid][pDivision] >= 3 || PlayerInfo[playerid][pMember] == 2 && PlayerInfo[playerid][pDivision] == 1)
    {
        SendClientMessageEx(playerid, COLOR_WHITE, "You can't accept this invite as you're already in a family/faction.");
    }
    if (PlayerInfo[playerid][pLevel] < 2)
    {
        SendClientMessageEx(playerid, COLOR_GRAD1, "You must be at least level 2.");
    }
    if(IsPlayerInRangeOfPoint(playerid,3.0,2489.9746,-1691.7869,14.7656)) //Grove Street
    {
        PlayerInfo[playerid][pFMember] = 0;
        PlayerInfo[playerid][pRank] = 1;
        SendClientMessageEx(playerid, COLOR_LIGHTBLUE,"You have successfully joined Grove Street Families (Public Gang)! Remember this is a public gang!");
        SaveFamilies();
    }
    else
    {
        SendClientMessageEx(playerid, COLOR_WHITE, "Your not in range of a gang point to join!");
    }
    return 1;
}
This should fix the warning.

I need to know the line with the error.
Reply
#6

Well even though im in a faction/family
pawn Код:
if( PlayerInfo[playerid][pMember] >= 3 || PlayerInfo[playerid][pFMember] != 255 || PlayerInfo[playerid][pLeader] >= 3 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 && PlayerInfo[playerid][pDivision] >= 3 || PlayerInfo[playerid][pMember] == 2 && PlayerInfo[playerid][pDivision] == 1)
    {
        SendClientMessageEx(playerid, COLOR_WHITE, "You can't accept this invite as you're already in a family/faction.");
    }
It still comes up with I succesfully joined the gang
Reply
#7

Hello,

What's your group variable? so with some servers its pGroup
Reply
#8

Quote:
Originally Posted by Daniel_Davis
Посмотреть сообщение
Hello,

What's your group variable? so with some servers its pGroup
pFMember
Reply
#9

try changing it to

pawn Код:
PlayerInfo[playerid][pFMember] >= 1
That way it will see if there in a group or not and if they are then return that message, Hope I helped.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)