Hello, I have a lot of options and I want to save space and turn them into "for" operator, but I dont know how... I tried but there isn't effect...
Simple Example Code
PHP Code:
enum _:options
{
opt1,
opt2,
opt3,
}
new g_options[33][options];
public menu_cb(id, menu, item)
{
if( g_options[id][opt1] && iItem == 0 )
{
return ITEM_DISABLED;
}
if( g_options[id][opt2] && iItem == 1 )
{
return ITEM_DISABLED;
}
if( g_options[id][opt3] && iItem == 2 )
{
return ITEM_DISABLED;
}
}
I want to do something like that, but now there isn't effect:
PHP Code:
for( new item; item<sizeof(options-1); item++ )
{
for( new inum; inum<sizeof(iItem-1); inum++ )
{
if( g_options[id][item] && iItem == inum )
{
return ITEM_DISABLED;
}
}
}
I would like to help me. Thanks