Stuck with couple errors, need help.
#1

Hello im kinda stuck with couple errors here:
pawn Код:
(2572) : error 029: invalid expression, assumed zero
(2572) : error 029: invalid expression, assumed zero
(2572) : warning 215: expression has no effect
(2572) : error 001: expected token: ";", but found "]"
(2572) : fatal error 107: too many error messages on one line
pawn Код:
if(gangcmd==1) {
            if(playerGang[playerid]>0) {
                SendClientMessage(playerid, CWARN, "You are already in a gang!");
                return 1;
            }
            for(new i = 1; i < MAX_GANGS; i++) {
                if(gangInfo[i][0]==0) {
                    format(gangNames[i], MAX_GANG_NAME, "%s", tmp2);
                    gangInfo[i][0]=1;
                    gangInfo[i][1]=1;
(line 2572)>>>      gangInfo[i][2]=PlColor[playerid];
                    gangMembers[i][0] = playerid;
                    format(string2, sizeof(string2),"You created gang '%s' (id: %d)", gangNames[i], i);
                    SendClientMessage(playerid, CINFO, string2);
                    format(string2, sizeof(string2),"Gang with the name : '%s' (id: %d) has been created by %s", gangNames[i], i, playername);
                    print(string2);
                    playerGang[playerid]=i;
                    return 1;
                }
            }
            return 1;
might help me with this, im kinda confused what to do next, the error definitions that i found
here http://www.compuphase.com/pawn/Pawn_Language_Guide.pdf confuse me a bit...
thanks regards.
Reply
#2

Can you show the "new gangInfo" and the "new PlColor" please.
Reply
#3

pawn Код:
new gangInfo[MAX_GANGS][3];
pawn Код:
#define PlColor            0xFFFF00AA
Reply
#4

Use:
pawn Код:
gangInfo[i][2]=PlColor;
Reply
#5

no, that doesnt helps, it has even troubles with it
pawn Код:
(52) : error 017: undefined symbol "i"      <<<< the  new gangInfo[i][2]=PlColor; at line 52
(52) : error 001: expected token: "}", but found ";"
(2571) : error 032: array index out of bounds (variable "gangInfo")
(2571) : error 029: invalid expression, assumed zero
(2571) : warning 215: expression has no effect
(2571) : error 001: expected token: ";", but found "]"
(2571) : fatal error 107: too many error messages on one line
Reply
#6

Noooooooo!!! I meant at the code, not at the "new".

Change Line 2572 (The one with error) to the piece I gave you (simply remove the '[playerid]').

And un-do the changes at the "new" one.
Reply
#7

ahhh lol my bad thanks dude
Reply
#8

No problem. Have fun.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)