enum connections_Data {
cuniqueID,
cname[126],
cleader[126],
cmaxranks,
crankname[13][24],
cbank
};
new connectionData[999][connections_Data];
crankname[13][24],
format(connectionData[crankname][1], 24, "example 1");
format(connectionData[crankname][2], 24, "example 2");
connectionData[something][crankname][1]
crankname[1]
Shouldn't it be:
Код:
connectionData[something][crankname][1] Код:
crankname[1] |
C:\Users\Jack\Documents\SA-MP 0.3.7 R2\gamemodes\outback.pwn(670) : error 001: expected token: "}", but found "[" C:\Users\Jack\Documents\SA-MP 0.3.7 R2\gamemodes\outback.pwn(705) : error 017: undefined symbol "cbank"
for(new i = 0; i < sizeof(connectionData[conID][cmaxranks]); i++)
{
format(str2, sizeof(str2), "%s\n%d %s", str2, i+!, connectionData[conID][crankname][i]);
}
sizeof(connectionData[conID][cmaxranks])
I'm not exactly sure, but I think what's causing the problem is
Код:
sizeof(connectionData[conID][cmaxranks]) |
enum connections_Data {
cuniqueID,
cname[126],
cleader[126],
cmaxranks,
crankname[MAX_CON_RANKS][24], // 670
cbank // this is used on line 705 and is undefined because of the error above
};
C:\Users\Jack\Documents\SA-MP 0.3.7 R2\gamemodes\outback.pwn(670) : error 001: expected token: "}", but found "[" C:\Users\Jack\Documents\SA-MP 0.3.7 R2\gamemodes\outback.pwn(705) : error 017: undefined symbol "cbank"
That's a 4D array which is not supported. The most common solution would be to use crankname out of the enumerator. Zeex's patch for the compiler supports 4D arrays but not sure if your case would work.
|
That's a 4D array which is not supported. The most common solution would be to use crankname out of the enumerator. Zeex's patch for the compiler supports 4D arrays but not sure if your case would work.
|