I receive warnings when I compile, I know that there will be no glitches in the game and I can ignore it, but I don't like it when it appears, preferably it is better to have a cleaner code.
Code:
//// l4d_blackandwhite.sp
//
// D:\Program Files\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d_blackandwhite.sp(138) : warning 234: symbol "GetMaxClients" is marked as deprecated: Use MaxClients variable instead.
//
//
// D:\Program Files\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d_blackandwhite.sp(149) : warning 234: symbol "GetMaxClients" is marked as deprecated: Use MaxClients variable instead.
Here:
PHP Code:
//print to infected
else if(bandw_notice == 3)
{
for( new x = 1; x <= GetMaxClients(); x++)
{
if(!IsClientInGame(x) || GetClientTeam(x) == GetClientTeam(target) || x == target || IsFakeClient(x))
continue;
if(bandw_type == 1) PrintHintText(x, "%s (\x04%s\x01) is black and white.", targetName, charName);
else CPrintToChat(x, "{red}[{green}!{red}] {olive}%s{red} is black and white.", targetName);
}
}
//print to survivors
else
{
for( new x = 1; x <= GetMaxClients(); x++)
{
if(!IsClientInGame(x) || GetClientTeam(x) != GetClientTeam(target) || x == target || IsFakeClient(x))
continue;
if(bandw_type == 1) PrintHintText(x, "%s (\x04%s\x01) is black and white.", targetName, charName);
else CPrintToChat(x, "{red}[{green}!{red}] {olive}%s{red} is black and white.", targetName);
}
}
Code:
//// l4d_tank_damage_announce.sp
//
// D:\Program Files\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d_tank_damage_announce.sp(355) : warning 234: symbol "FloatMul" is marked as deprecated: This native is internal implementation. For multiplication use the '*' operator.
//
//
// D:\Program Files\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d_tank_damage_announce.sp(355) : warning 234: symbol "FloatDiv" is marked as deprecated: This native is internal implementation. For division use the '/' operator.
//
//
// D:\Program Files\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d_tank_damage_announce.sp(360) : warning 234: symbol "FloatMul" is marked as deprecated: This native is internal implementation. For multiplication use the '*' operator.
//
//
// D:\Program Files\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d_tank_damage_announce.sp(360) : warning 234: symbol "FloatDiv" is marked as deprecated: This native is internal implementation. For division use the '/' operator.
Here:
PHP Code:
GetDamageAsPercent(damage)
{
return RoundToFloor(FloatMul(FloatDiv(float(damage), g_fMaxTankHealth), 100.0));
}
bool:IsExactPercent(damage)
{
return (FloatAbs(float(GetDamageAsPercent(damage)) - FloatMul(FloatDiv(float(damage), g_fMaxTankHealth), 100.0)) < 0.001) ? true:false;
}
__________________