08.07.2015, 00:34
I have the following enumerator, and It will not let me create a 2D array variable:
// ----- [ FACTION VARIABLES ] -----
#define MAX_FACTION_RANKS 7
enum iFaction
{
ID,
Taken,
Type,
Name[128],
/*RankName1[50],
RankName2[50],
RankName3[50],
RankName4[50],
RankName5[50],
RankName6[50],
RankName7[50],*/
RankNames[MAX_FACTION_RANKS][50]
};
Any ideas why it won't let me create the RankNames variable? I'm a C# programmer and recently got into SAMP, and I'm currently making my own custom gamemode that is fully dynamic (using MySQL).
Errors:
error 001: expected token: "}", but found "["
error 010: invalid function or declaration
I assume the first error is created because the compiler is expecting me to identify the values in {}, however shouldn't it let me create 2D, 3D, etc arrays?
// ----- [ FACTION VARIABLES ] -----
#define MAX_FACTION_RANKS 7
enum iFaction
{
ID,
Taken,
Type,
Name[128],
/*RankName1[50],
RankName2[50],
RankName3[50],
RankName4[50],
RankName5[50],
RankName6[50],
RankName7[50],*/
RankNames[MAX_FACTION_RANKS][50]
};
Any ideas why it won't let me create the RankNames variable? I'm a C# programmer and recently got into SAMP, and I'm currently making my own custom gamemode that is fully dynamic (using MySQL).
Errors:
error 001: expected token: "}", but found "["
error 010: invalid function or declaration
I assume the first error is created because the compiler is expecting me to identify the values in {}, however shouldn't it let me create 2D, 3D, etc arrays?