PHP Code:
enum _:Items
{
Name[64],
Limit[33]
}
Why is
Limit an array? It only takes one number.
Name is an array of characters or a string with a maximum of 64 characters available in this case.
If you're on AMXX 1.9 or greater, consider ditching the formatex function and using fmt(). You'd get this:
PHP Code:
for(new i; i<2; i++)
{
static szInfo[3]
num_to_str(i, szInfo, charsmax(szInfo))
menu_additem(menu, fmt("%s", szItemInfo[i][Name]), szInfo)
}
Be careful though, if you were to use fmt inside another fmt, you'd get errors, but this is a much better approach in your case.
Also, there is no need to increment ItemUsed in there if the condition results in false, just put it under the switch statement.