The shopmenu item categories work perfectly, other than I don't get a next/back button.
It looks as though two different programmers made the categories work for shopmenu item and racechange menu, because the methods are using two different ways.
Can someone tell me some steps that I might have missed while trying to get racechange menu to work? I've tried to set the variable war3_racecats 1, and also used war3_reloadcats.
When I set war3_racecats 1, the command for changerace doesn't respond or work. During debug I've found that the for(new i=1;i<CatCount;i++) only displays 1 category and hangs. I've got all the categories setup for all the races, as I only have 4 categories.
I'm still in the process of debugging trying to figure out why it won't display the category menu for changerace menu. It knows it needs to display it, but for some reason hangs.
Something tells me the problem exists right here:
Code:
for(new i=1;i<CatCount;i++) {
W3GetCategory(i,strCat,sizeof(strCat));
if(strlen(strCat)>0) {
if(HasCategoryAccess(client,i)) {
new amount=GetNewRacesInCat(client,strCat);
if(amount>0) {
decl String:buffer[64];
Format(buffer,sizeof(buffer),"%s (%i new races)",strCat,amount);
}
else
AddMenuItem(crMenu,strCat,strCat);
W3GetCategory(i,strCat,sizeof(strCat));
if(strlen(strCat)>0) {
if(HasCategoryAccess(client,i)) {
new amount=GetNewRacesInCat(client,strCat);
if(amount>0) {
decl String:buffer[64];
Format(buffer,sizeof(buffer),"%s (%i new races)",strCat,amount);
}
else
AddMenuItem(crMenu,strCat,strCat);
Anyone have a clue to why it won't display the changerace menu? That I'm missing something or did something wrong?
on a side note: war3_racecats 0 works fine. It displays the regular non-category changerace menu.




Logged






I just tried the new code .... it now doesn't work for both changeraces.. with or without cats enabled.
? I had to recompile my own .bak code to get the non-category system working again.