| Diegorkable |
11-19-2011 09:30 |
Menu Question
Hey guys,
I created a menu of map votes and I get in the error_log 2 wierd stuff:
These are the lines I am getting the first error on:
PHP Code:
// Some irrelevant public and code...
new players[32], pnum, tempid; get_players(players, pnum, "ch");
for( new i; i<pnum; i++ ) { tempid = players[i]; ColorChat(tempid, RED, "%s ^3Please ^4vote^3 for the ^4map^3 you'd like to play in.", PREFIX_COLOR) menu_display(tempid, gVoteMenu); // Line 2804 } // Line 2805
Error log:
Code:
L 11/19/2011 - 15:35:25: Plugin called menu_display when item=MENU_EXIT
L 11/19/2011 - 15:35:25: [AMXX] Displaying debug trace (plugin "adminslots.amxx")
L 11/19/2011 - 15:35:25: [AMXX] Run time error 10: native error (native "menu_display")
L 11/19/2011 - 15:35:25: [AMXX] [0] pimpdr.sma::StartVote (line 2805)
L 11/19/2011 - 15:35:25: [AMXX] [1] pimpdr.sma::StartVote (line 2804)
Why the hell is item = MENU_EXIT?!
Second error:
PHP Code:
// The public where it counts the votes... my question is about the menu_destroy so the rest isnt relevant....
menu_destroy(gVoteMenu) return PLUGIN_HANDLED
log:
Code:
L 11/19/2011 - 15:35:31: Invalid menu id 11(12)
L 11/19/2011 - 15:35:31: [AMXX] Displaying debug trace (plugin "adminslots.amxx")
L 11/19/2011 - 15:35:31: [AMXX] Run time error 10: native error (native "menu_destroy")
L 11/19/2011 - 15:35:31: [AMXX] [0] pimpdr.sma::EndVote (line 2925)
What wrong with destroying the menu after vote is done? and why is the menu id invalid? The variable of gVoteMenu is global btw...
Thanks for your time.
|