AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Menu Problems ??? (https://forums.alliedmods.net/showthread.php?t=46242)

Nostrodamous 10-22-2006 05:07

Menu Problems ???
 
:) Hey guys . Ok , so im still working on my admin-menu. It has alot of menus in it . i must have registered 40 menus . It compiles perfectly , there are no run-time errors when I debug it . But when I execute commands from the last set of menus I added ( my set cvars for bots menus) it sets the cvars I want for the bots , but it also seems to execute commands from other menus in the plugin. I cant seem to find any errors in my code , but it seems to have tangled somewhere , so Im wondering if theres a limit to the amount of times I can use register_menucmd ? thats the only explanation I can find for the problem . I would post my code but its 1400 lines so ill just explaine the problem :)
Any ideas?
- Thanks

Nostrodamous 10-22-2006 13:00

Re: Menu Questions
 
BUMP : any ideas ?:cry:

Nostrodamous 10-23-2006 19:00

Re: Menu Problems ???
 
any ideas can anyone help ?????:|

stupok 10-23-2006 23:02

Re: Menu Problems ???
 
Relax you don't need to bump so often. What I'm thinking is that you are seeing a menu that hasn't actually been activated, while a different menu is the active one. So, you push a key, thinking it will activate the inactive, but displayed menu, but the undisplayed active menu will be executed.

I think that is definitely a possibility when you have so many menus garbled into one big mess. All I can say is look over your code for mistakes when calling show_menu().


I would advise you to separate the menus, if at all possible. I don't think anyone feels like reviewing 1000+ lines of code for misuse of show_menu functions.

Nostrodamous 10-23-2006 23:50

Re: Menu Problems ???
 
hmmmmm. where to start . lets start by saying , obviously ive looked my code over line by line 100 times. and like i said before(maybee you didnt read that part) I cant find any problem with the code. and sperating the menus makes no sense at all. And i dont remmeber asking anyone to review my 1400 lines of code. Ive bumped twice in 2 days .
Summarry- no help at all:down:

Freecode 10-24-2006 00:01

Re: Menu Problems ???
 
No there isnt a limit on register_menucmd

SweatyBanana 10-24-2006 00:10

Re: Menu Problems ???
 
Hello raphero2000.

Rolnaaba 10-24-2006 10:24

Re: Menu Problems ???
 
when having many menus they often get jumbled at no fault of the coder, especially when using old menu style

Nostrodamous 10-24-2006 11:25

Re: Menu Problems ???
 
Quote:

Originally Posted by Freecode (Post 394562)
No there isnt a limit on register_menucmd

thank you freecode :up: Is there any way around this jumbiling or mens ? i even switched from register_menucmd to register_menu , and tried alot of other stuff. is there a way to cut down on them?

stupok 10-24-2006 20:08

Re: Menu Problems ???
 
Quote:

Originally Posted by stupok69 (Post 394544)
What I'm thinking is that you are seeing a menu that hasn't actually been activated, while a different menu is the active one. So, you push a key, thinking it will activate the inactive, but displayed menu, but the undisplayed active menu will be executed.

You bumped once in the same day, then again the next day. Also I don't remember saying that anyone should or would review your code or that you wanted someone to do so.

Back on topic...

I still think that the part you ignored above is your problem. Try throwing in a couple menu_destroy() in the code to make sure the menus do not overlap each other.


All times are GMT -4. The time now is 04:52.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.