Raised This Month: $ Target: $400
 0% 

Why does this top10 not show top20?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
blood2k
Senior Member
Join Date: Mar 2014
Old 08-06-2018 , 15:52   Why does this top10 not show top20?
Reply With Quote #1

Code:
// Get and format top 15.
format_top15( id, sBuffer[MAX_BUFFER_LENGTH + 1])
{
	new iMax = get_statsnum()
	new izStats[8], izBody[8]
	new iLen = 0

	if (iMax > 10)
		iMax = 10

	new istate[2]

	new top_name[64]
	format ( top_name, sizeof ( top_name ) - 1, "%L", id, "HTML_PLAYER_TOP" )
	iLen = format ( sBuffer, MAX_BUFFER_LENGTH, "%L%L", id, "HTML_TOP_BODY", top_name, id, "HTML_TOP_HEADER" )

	for (new i = 0; i < iMax && MAX_BUFFER_LENGTH - iLen > 0; i++)
	{
		if (equali(istate, "a"))
			copy(istate, sizeof(istate)-1, "b")
		else
			copy(istate, sizeof(istate)-1, "a")
		get_stats(i, izStats, izBody, t_sName, MAX_NAME_LENGTH)
		replace_all(t_sName, MAX_NAME_LENGTH, "<", "[")
		replace_all(t_sName, MAX_NAME_LENGTH, ">", "]")
		iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%L", id, "HTML_TOP_TABLE", istate, i+1, t_sName, izStats[STATS_KILLS],
						izStats[STATS_DEATHS], izStats[STATS_HITS], izStats[STATS_SHOTS], izStats[STATS_HS], effec(izStats), accuracy(izStats))
	}
	iLen += format ( sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%L", id, "HTML_CLOSE" )
}


I changed the 2 iMax that say 10, to 20... but it then shows 13 players and 13th has no stats... how do I get this to show 20? :/
blood2k is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:39.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode