SA-MP Forums Archive
[Help] Errors I get :/ - 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] Errors I get :/ (/showthread.php?tid=173145)



[Help] Errors I get :/ - BlacK_PT - 01.09.2010

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")



Re: [Help] Errors I get :/ - Yamoo - 01.09.2010

Which line is which?


Re: [Help] Errors I get :/ - Claude - 01.09.2010

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

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



Re: [Help] Errors I get :/ - BlacK_PT - 01.09.2010

the "new" is on 1169

the "enum pinfo" is on 1545

the "public InitPlayer" is on 2043

the "/invite" is on 31325


Re: [Help] Errors I get :/ - Yamoo - 01.09.2010

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.


Re: [Help] Errors I get :/ - BlacK_PT - 01.09.2010

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



Re: [Help] Errors I get :/ - Yamoo - 01.09.2010

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 )


Re: [Help] Errors I get :/ - BlacK_PT - 01.09.2010

1545 InviteOffer[128],

31356 PlayerInfo[InviteOffer][para1] = playerid;


Re: [Help] Errors I get :/ - BlacK_PT - 01.09.2010

BUMP
Help please :/


Re: [Help] Errors I get :/ - BlacK_PT - 01.09.2010

Someone help me :/