mirko911
HI ,
da unserer Server im mehr PUB wird, merke ich, wie die Spieler immer öfter durch
G_FindConfigstringIndex: overflow (309): '
gekickt werden. Ich vermute , dass es durch mein KD Ratio Script kommt. Wenn die Division zu lange ist.
Hier meine Frage:
kann ich den Fehler irgendwie beseiitigen?
ShowKDRatio()
{
self notify( "new_KDRRatio" );
self endon( "new_KDRRatio" );
self endon( "disconnect" );
if( IsDefined( self.mc_kdratio ) )
{
self.mc_kdratio Destroy();
}
wait ( 0.05 );
self.mc_kdratio = NewClientHudElem(self);
self.mc_kdratio.x = 7;
self.mc_kdratio.y = 140;
self.mc_kdratio.horzAlign = "left";
self.mc_kdratio.vertAlign = "top";
self.mc_kdratio.alignX = "left";
self.mc_kdratio.alignY = "middle";
self.mc_kdratio.alpha = 1;
self.mc_kdratio.fontScale = 1.4;
self.mc_kdratio.hidewheninmenu = true;
self.mc_kdratio.color = (0.97, 0.94, 0.26);
self.mc_kdratio.label = &"K/D Ratio: ";
self.mc_headshot = NewClientHudElem(self);
self.mc_headshot.x = 7;
self.mc_headshot.y = 150;
self.mc_headshot.horzAlign = "left";
self.mc_headshot.vertAlign = "top";
self.mc_headshot.alignX = "left";
self.mc_headshot.alignY = "middle";
self.mc_headshot.alpha = 1;
self.mc_headshot.fontScale = 1.4;
self.mc_headshot.hidewheninmenu = true;
self.mc_headshot.color = (0.97, 0.94, 0.26);
self.mc_headshot.label = &"Headshots: ^1 ";
while( true )
{
text = "^5--";
ratio = 0;
hs = self.pers[ "headshots" ];
kills = self.pers[ "kills" ];
deaths = self.pers[ "deaths" ];
if( IsDefined( kills ) && IsDefined( deaths ) )
{
if( deaths < 1 )
{
deaths = 1;
}
if( kills > 0 )
{
ratio = itof( kills ) / itof( deaths );
if( ratio == 1)
{
text = "^2" + ratio;
}
if( ratio < 1)
{
text = "^1" + ratio;
}
else{
text = "^3" + ratio;
}
}
}
if( ratio > 15){
wait ( 0.5 );
self giveweapon("mp5_mp");
self SetWeaponAmmoClip( "mp5_mp", 30 );
self switchToWeapon("mp5_mp");
}
self.mc_kdratio SetText( text );
self.mc_headshot SetText( hs );
wait ( 0.05 );
}
}
itof( int )
{
SetDvar( "temp_float", int );
return GetDvarFloat( "temp_float" );
}
da unserer Server im mehr PUB wird, merke ich, wie die Spieler immer öfter durch
G_FindConfigstringIndex: overflow (309): '
gekickt werden. Ich vermute , dass es durch mein KD Ratio Script kommt. Wenn die Division zu lange ist.
Hier meine Frage:
kann ich den Fehler irgendwie beseiitigen?
ShowKDRatio()
{
self notify( "new_KDRRatio" );
self endon( "new_KDRRatio" );
self endon( "disconnect" );
if( IsDefined( self.mc_kdratio ) )
{
self.mc_kdratio Destroy();
}
wait ( 0.05 );
self.mc_kdratio = NewClientHudElem(self);
self.mc_kdratio.x = 7;
self.mc_kdratio.y = 140;
self.mc_kdratio.horzAlign = "left";
self.mc_kdratio.vertAlign = "top";
self.mc_kdratio.alignX = "left";
self.mc_kdratio.alignY = "middle";
self.mc_kdratio.alpha = 1;
self.mc_kdratio.fontScale = 1.4;
self.mc_kdratio.hidewheninmenu = true;
self.mc_kdratio.color = (0.97, 0.94, 0.26);
self.mc_kdratio.label = &"K/D Ratio: ";
self.mc_headshot = NewClientHudElem(self);
self.mc_headshot.x = 7;
self.mc_headshot.y = 150;
self.mc_headshot.horzAlign = "left";
self.mc_headshot.vertAlign = "top";
self.mc_headshot.alignX = "left";
self.mc_headshot.alignY = "middle";
self.mc_headshot.alpha = 1;
self.mc_headshot.fontScale = 1.4;
self.mc_headshot.hidewheninmenu = true;
self.mc_headshot.color = (0.97, 0.94, 0.26);
self.mc_headshot.label = &"Headshots: ^1 ";
while( true )
{
text = "^5--";
ratio = 0;
hs = self.pers[ "headshots" ];
kills = self.pers[ "kills" ];
deaths = self.pers[ "deaths" ];
if( IsDefined( kills ) && IsDefined( deaths ) )
{
if( deaths < 1 )
{
deaths = 1;
}
if( kills > 0 )
{
ratio = itof( kills ) / itof( deaths );
if( ratio == 1)
{
text = "^2" + ratio;
}
if( ratio < 1)
{
text = "^1" + ratio;
}
else{
text = "^3" + ratio;
}
}
}
if( ratio > 15){
wait ( 0.5 );
self giveweapon("mp5_mp");
self SetWeaponAmmoClip( "mp5_mp", 30 );
self switchToWeapon("mp5_mp");
}
self.mc_kdratio SetText( text );
self.mc_headshot SetText( hs );
wait ( 0.05 );
}
}
itof( int )
{
SetDvar( "temp_float", int );
return GetDvarFloat( "temp_float" );
}