Fixed bad loop in RTV
authorMichael McKoy <ferret99gt@gmail.com>
Sun Oct 07 20:50:52 2007 +0000 (2007-10-07)
changeset 15320bf962c36e8b
parent 1531 766b08c6e6c2
child 1533 cc409bf11f9f
Fixed bad loop in RTV
plugins/rockthevote.sp
     1.1 --- a/plugins/rockthevote.sp	Fri Oct 05 22:38:22 2007 +0000
     1.2 +++ b/plugins/rockthevote.sp	Sun Oct 07 20:50:52 2007 +0000
     1.3 @@ -359,12 +359,12 @@
     1.4  	for (new i = 0; i < limit; i++)
     1.5  	{
     1.6  		decl String:map[64];
     1.7 -		new b = GetRandomInt(0, limit - 1);
     1.8 +		new b = GetRandomInt(0, GetArraySize(g_MapList) - 1);
     1.9  		GetArrayString(g_MapList, b, map, sizeof(map));
    1.10  		
    1.11  		while (IsStringInArray(g_RTVMapList, map))
    1.12  		{
    1.13 -			b = GetRandomInt(0, limit - 1);
    1.14 +			b = GetRandomInt(0, GetArraySize(g_MapList) - 1);
    1.15  			GetArrayString(g_MapList, b, map, sizeof(map));
    1.16  		}
    1.17