Thread: Multi Vote
View Single Post
pizzahut
Senior Member
Join Date: Oct 2004
Old 09-28-2021 , 06:40   Re: Multi Vote
Reply With Quote #34

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

Last edited by pizzahut; 09-28-2021 at 06:45.
pizzahut is offline