SA-MP Forums Archive
table - 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: table (/showthread.php?tid=230387)



table - armyoftwo - 23.02.2011

pawn Код:
enum ggInfo
{
     gName[64],
     gLeader[24],
     gRank[10][24], // : error 001: expected token: "}", but found "["
     gRSkin[10],
     gID,
     Float:gHQ[4]
};
new GangInfo[MAX_GANGS][ggInfo];
I have commented the line
I was wondering why does it give me the error


Re: table - iJumbo - 23.02.2011

why [10][24] ? 24 its name and 10 ?


Re: table - armyoftwo - 23.02.2011

For example: I have 10 Ranks and every rank has 24 characters.

It would be same as
pawn Код:
gRank1[24]
gRank2[24]
gRank3[24]
....
gRank10[24]
Anyone has an idea?


Re: table - deather - 23.02.2011

Idk why but when you remove the column index [24] from the string it compiles.

Better use as you requested:
Код:
gRank1[24]
gRank2[24]
gRank3[24]
gRank4[24]
gRank5[24]
gRank6[24]
gRank7[24]
gRank8[24]
gRank9[24]
gRank10[24]
Or if you need to loop through it to pack the string, I think you need to find some other means.