Thread: Multi Vote
View Single Post
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 09-27-2021 , 11:46   Re: Multi Vote
Reply With Quote #33

Quote:
Originally Posted by pizzahut View Post
There's a bug with two occurrences in the source code.
While player IDs start with 1, array indexes start with 0.
So in lines 65 to 67 and 104 to 106 this is wrong:
Code:
	get_players(Players, iNum, "ch")
	
	for(new a = 1; a < iNum; a++)
It should be changed to:
Code:
	get_players(Players, iNum, "ch")
	
	for(new a; a < iNum; a++)
When 0 passes it is the world though. For instance when my client temp program is running and 0 is applied from get_players it gets server's temperature. It's quite demonstrative seeing that occur. When 0 is used it is broadcast in messages all 1-32, that's the 32 potential clients. Perhaps confused with entity index against client's index. While one of the players is 1-32 they are a different number deeper down.

Quoting Valve now.
Quote:
An entity index is a unique integer given to every entity by the engine. It allows the same entity to be referred to across library boundaries, but will be different on the client and server unless an edict is used.
  • Tip: Worldspawn is always entity 0, while indices 1 to <maxplayers> are reserved for players.
Perhaps they cannot see menu because 0 wasn't being used to broadcast and sent it to everybody. That being said, I did not look at the script on this thread yet.
__________________
DJEarthQuake is offline