As already mentioned, it's not a player index, but an array index. I've omitted the next line because it's different for the two locations with the bug. But the use of "get_players" should be a clue.
Original code:
Code:
new Players[32], iNum
get_players(Players, iNum, "ch")
for(new a = 1; a < iNum; a++)
menu_display(Players[a], menu, 0)
Code:
new Players[32], iNum
get_players(Players, iNum, "ch")
for(new a = 1; a < iNum; a++)
menu_cancel(Players[a])
Examples are in the wiki:
https://wiki.alliedmods.net/Intro_to...Admin_Commands
https://wiki.alliedmods.net/Advanced...g_Log_Messages
https://wiki.alliedmods.net/Optimizi...e-index_Arrays