Invalid menu id
Hi !
I got errors with my plugins, and it's invalid menu id. I can't find any information about the error. I guess it's because its wrong id "selected". For example you want to show a menu, the id is 3 but for some reason 'menu_display' sends id 0. So I want to know exactly how to fix the error, or what's making it and what the error means. I'm sure it's different from plugin to plugin. But just a definiton of it and what's creating it. If I need to post my script and show just ask. Quote:
|
Re: Invalid menu id
I'll post the code to make it clearer :
Code:
Code:
|
Re: Invalid menu id
did you destroy the menu_id_model_t ?
|
Re: Invalid menu id
The menu works the first time, but if I try to use it again the menu locks and the error occurs even if I choose menu option 0 (exit).
Code:
|
Re: Invalid menu id
I don't know where you created your model menu, but it seems they are created at plugin start. I assume menu_id_model_t is a global variable
when you destroy the menu, menu_id gone. which means you need to create the menu again when you need it. So if the model menu is global (static), do not destroy it |
Re: Invalid menu id
It's ok, I got help from Emp and fixed the menu.
I fixed it the same way as you posted. I created the menu non-global. |
| All times are GMT -4. The time now is 05:36. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.