I am makeing a menu, and have fixed all the errors, except for two errors I never heard of, and can't find any help with on the web.
[PHP]void MRender(int ix, int iy,D3DCOLOR i_color){
PrintText(ix+10, iy-10,_O_,pFont, "MenuTestV1.0");
int ai=0;
int i=0;
while(ai<MMI){
if(MENU[i].typ==(char)"FOLDER"){
ai++;
i_color=_R_;
int val=(MENU[ai].var)?(*MENU[ai].var);
PrintText(ix+10, iy-(15+(ai*8)), i_color,pFont, MENU[ai].txt);
PrintText(ix+75, iy-(15+(ai*8)), i_color,pFont, MENU[ai].opt[MENU[ai].var]);
}
else{
if(MENU[i].cm>0){
ai++;
int value=MENU[i].var;
if(value==0){
i_color=_B_;
}
else{
i_color=_G_;
}
int item_num = MENU[i].var;
PrintText((int)ix+25, (int)iy-(15+(ai*8)),i_color, pFont, MENU[i].txt);
PrintText((int)ix+75, (int)iy-(15+(ai*8)),i_color, pFont, MENU[i].opt[item_num]);
}
}
drawBox(ix, iy, 80, (ai*8),i_color,pDevice);
}
}[/PHP]
and:
[PHP]char *_Folder[]={"<+>","<->"};
char *_on_off[]={"DISABLED","ENABLED"};
char *_1to5[]={"DISABLED","2","3","4","5"};
char *_off_2[]={"DISABLED","OPK","TELE"};
char *_act_1[]={"INACTIVE","ACTIVE"};
char *_color_[]={"Red","Blue","Green","Orange","Yellow","White"," Black"};[/PHP]in my menu I assign _Menu[Item].opt to one of these And what I am trying to do is print the item of the option that is corresponding to the variable _Menu[Item].var
This is the error I get:
Code:
error C2109: subscript requires array or pointer type
Can anyone tell me what is the problem, am I just missing something obvious, or is the code wrong?