[Help] Errors I get :/
#1

Ok so, I have this pawno command:

pawn Код:
if(strcmp(cmd, "/invite", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /invite [playerid/PartOfName]");
                return 1;
            }
            new para1;
            new ftext[128];
            para1 = ReturnUser(tmp);
            if (RankRequire(playerid))
            {
                if(IsPlayerConnected(para1))
                {
                    if(para1 != INVALID_PLAYER_ID)
                    {
                        if (PlayerInfo[para1][pMember] == 0)
                        {
                            if(PlayerInfo[playerid][pMember] == 7  && PlayerInfo[playerid][pRank] >= 9) { ftext = "Police Force"; }
                            else if(PlayerInfo[playerid][pMember] == 2) { ftext = "FBI/ATF"; }
                            else if(PlayerInfo[playerid][pMember] == 3) { ftext = "Goverment";}
                            else if(PlayerInfo[playerid][pMember] == 4) { ftext = "Firemen/Ambulance"; }
                            else if(PlayerInfo[playerid][pMember] == 5) { ftext = "San Andreas News"; }
                            else if(PlayerInfo[playerid][pMember] == 6) { ftext = "Target FM Radio 98.6"; }
                            else if(PlayerInfo[playerid][pMember] >= 8) { ftext = FamilyInfo[PlayerInfo[playerid][pMember]][FamilyName]; }
                            else { SendClientMessage(playerid,COLOR_GREY," You are not in a valid faction !"); return 1; }
                            GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                            GetPlayerName(playerid, sendername, sizeof(sendername));
                            PlayerInfo[InviteOffer][para1] = playerid;
                            if(PlayerInfo[playerid][pMember] >= 8)
                            {
                                format(string, sizeof(string), "   You have been invited to join %s from Leader %s, type /accept invite to join", FamilyInfo[PlayerInfo[playerid][pMember]][FamilyName], sendername);
                                SendClientMessage(para1, COLOR_WHITE, string);
                                format(string, sizeof(string), "   You have Invited %s to join the %s.", giveplayer,FamilyInfo[PlayerInfo[playerid][pMember]][FamilyName]);
                                SendClientMessage(playerid, COLOR_WHITE, string);
                            }
                            else
                            {
                                format(string, sizeof(string), "   You have been invited to join %s from Leader %s, type /accept invite to join", ftext, sendername);
                                SendClientMessage(para1, COLOR_WHITE, string);
                                format(string, sizeof(string), "   You have Invited %s to join the %s.", giveplayer,ftext);
                                SendClientMessage(playerid, COLOR_WHITE, string);
                            }
                        }
                        else
                        {
                            SendClientMessage(playerid, COLOR_GREY, "  That player is already a Family Member.");
                            return 1;
                        }
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   You are not a faction leader!");
            }
        }
        return 1;
    }
On the first lines I have this


pawn Код:
new InviteOffer[MAX_PLAYERS];
then I have this:

pawn Код:
enum pInfo
{
...,
...,
InviteOffer,
};
after that I got this:

pawn Код:
public InitPlayer(playerid) {
blablabla;
blabla;
InviteOffer[playerid] = SCRIPT_PLAYERS;
return 1;
}
and in the end:

Код:
(1545) : error 021: symbol already defined: "InviteOffer"
(31356) : error 033: array must be indexed (variable "InviteOffer")
Reply
#2

Which line is which?
Reply
#3

Change this at `enum`
pawn Код:
InviteOffer[128],

pawn Код:
SCRIPT_PLAYERS = InviteOffer[playerid];
Reply
#4

the "new" is on 1169

the "enum pinfo" is on 1545

the "public InitPlayer" is on 2043

the "/invite" is on 31325
Reply
#5

Quote:
Originally Posted by BlacK_PT
Посмотреть сообщение
the "new" is on 1169

the "enum pinfo" is on 1545

the "public InitPlayer" is on 2043

the "/invite" is on 31325
I meant the lines of the errors.
Reply
#6

Код:
(1545) : error 021: symbol already defined: "InviteOffer"
(31356) : error 033: array must be indexed (variable "InviteOffer")
Reply
#7

Okay, i know the errors can you copy and paste line 1545, and 31356?
If it's okay.

(Just to waste time from this 120 second rule, Hi i'm Yamoo this is my new message.. do you like it? I do muahh i pwn. Do you like this rule? Of course not.. I smell a protest time )
Reply
#8

1545 InviteOffer[128],

31356 PlayerInfo[InviteOffer][para1] = playerid;
Reply
#9

BUMP
Help please :/
Reply
#10

Someone help me :/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)