Why it prints like
Quote:
1. 1 First
2. 2 First
3. 3 First
|
I want
Quote:
1. 1 First
2. 1 Second
3. 1 Third
4. 1 Fourth
|
PHP Code:
#define MAX_CATEGORIES 3
new const g_iMaxNames[MAX_CATEGORIES] = { 4, 2, 5 };
new const g_szNames[][] =
{
{ "1 First", "1 Second", "1 Third", "1 Fourth" },
{ "2 First", "2 Second" },
{ "3 First", "3 Second", "3 Third", "3 Fourth", "3 Fiveth" }
};
// In menu
for (new i = 0; i < g_iMaxNames[Selection]; i++)
{
new szItem[256];
formatex(szItem, charsmax(szItem), "%s", g_szNames[Selection][i]) // Know that problem is here, but I don't get it..
menu_additem(Menu, szItem, "", 0);
}