02.06.2017, 20:45
Hey.
I'm trying to loop through an enum. The problem is, I can't do it correctly because I've a string + integer.
My enum:
It simply print as : f_Info[factionid][fName][0], f_Info[factionid][fName][1], ... instead of f_Info[factionid][fName], f_Info[factionid][fDiminutive].
NB: The loop works correctly apart from the string values
Second question: 4D arrays cost a lot of memory or there any changes?
Edit: I can't use an another dimensions in the loop.
I'm trying to loop through an enum. The problem is, I can't do it correctly because I've a string + integer.
My enum:
PHP код:
enum E_FACTION_INFOS
{
fSQLID,
fName[MAX_FAC_RANK_NAME],
fDiminutive[MAX_DIMINUTIVE_LT],
fType,
fNumberOfRank,
fMaxMembers,
fPay,
fBank,
fState,...
};
new f_Info[MAX_ALL_FACT][E_FACTION_INFOS];
for(new i = 1, E_FACTION_INFOS:k = fName; i < max_fields_per_table[STATS_INFOS]; i++, k++)
{
mysql_format(db, sec_query, sizeof(sec_query), ", `%s` = '%s'", SQL_Fields[0][i][sqlName], SQL_Fields[0][i][sqlSpecifier]);
printf("[debug-A] %s", sec_query);
mysql_format(db, sec_query, sizeof(sec_query), sec_query, f_Info[factionid][k]);
printf("[debug-B] %s\n", sec_query);
strcat(query, sec_query);
}
NB: The loop works correctly apart from the string values
Second question: 4D arrays cost a lot of memory or there any changes?
Edit: I can't use an another dimensions in the loop.