Enums - string arrays
#1

pawn Код:
enum factInfo
{
    Rank0[20],
    Rank1[20],
    Rank2[20],
    Rank3[20],
    Rank4[20],
    Rank5[20],
    Rank6[20],
    Division1[20],
    Division2[20],
    Division3[20],
    Division4[20],
    Division5[20],
    Division6[20],
    Division7[20],
    Division8[20],
    Divisions[8][20]
};
new Factions[MAX_FACTIONS][factInfo];

gives me certain errors

Код:
C:\Users\****\Desktop\****.pwn(2499) : error 001: expected token: "}", but found "["
C:\Users\****\Desktop\****.pwn(2500) : error 010: invalid function or declaration
C:\Users\****\Desktop\****.pwn(3439) : error 028: invalid subscript (not an array or too many subscripts): "Divisions"
C:\Users\****\Desktop\****.pwn(3439) : warning 215: expression has no effect
C:\Users\****\Desktop\****.pwn(3439) : error 001: expected token: ";", but found "]"
C:\Users\****\Desktop\****.pwn(3439) : error 029: invalid expression, assumed zero
C:\Users\****\Desktop\****.pwn(3439) : fatal error 107: too many error messages on one line
Line 2499:

pawn Код:
Divisions[8][20]
Line 2500:

pawn Код:
};
Line 3439:

pawn Код:
Divisions[0] = "hi";
Reply
#2

Post the code around those lines, other lines can give another line an error
Reply
#3

No, it's definitely this. I'm not new to PAWN. Regardless, this can be deleted as I've already continued this project using several enums.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)