string showing wrong value?
#1



As you can see on the image above it says "115" wins the round, which is a completely random value, trying to understand where I messed up. Here's the code.


(intendation is messed up ova here)
Код:
	new Player;
	for(new i=0; i<MAX_PLAYERS; i++)
	{
	    if(IsPlayerConnected(i))
	    {
	         if(roundKills[i] > roundKills[Player]) Player = i;
	    }
	}
	

	new pname[MAX_PLAYER_NAME];
	GetPlayerName(Player, pname, sizeof(pname));
	
	new string2[120];
	format(string2,sizeof(string2),"%d wins the round with %d kills.", pname, roundKills[Player]);
	SendClientMessageToAll(-1, string2);
Thank you for taking your time
Reply


Messages In This Thread
string showing wrong value? (solved) - by Counterafk - 16.01.2016, 22:16
Re: string showing wrong value? - by radiobizza - 16.01.2016, 22:19
Re: string showing wrong value? - by Counterafk - 17.01.2016, 02:14

Forum Jump:


Users browsing this thread: 1 Guest(s)