Hi,
I have this enum struct
PHP Code:
enum struct UpgradeInfo
{
bool bLoaded;
int iHealth;
int iDamage;
}
UpgradeInfo upgInfo[MAXPLAYERS+1];
and this char array:
PHP Code:
char szUpgradeNames[][] =
{
"Health Upgrade",
"Damage Upgrade"
};
What I wanted to do is create menu entries like so:
PHP Code:
char szUpgradeInfo[32], szUpgradeNum[4];
for(int i = 0; i < sizeof(szUpgradeNames); i++)
{
IntToString(i, szUpgradeNum, sizeof(szUpgradeNum));
Format(szUpgradeInfo, sizeof(szUpgradeInfo), "%s - %d", szUpgradeNames[i], upgInfo[client][i]);
menu.AddItem(szUpgradeNum, szUpgradeInfo);
}
but this
PHP Code:
upgInfo[client][i] // Wiki says: Note that even though enum structs are actually arrays, for the most part they cannot be used as arrays
and
PHP Code:
upgInfo[client].i
obviously do not work and I'm not sure how to solve this currently.