It looks like the error is from even earlier in your code.
Also, your indentation can be more consistent, e.g.,
if ( $totalvthugs <= 0 )
{
print 'Your victim does not have any units to attack!';
}
elseif ( $totalathugs <= 0 ) // line 269
{
echo 'You do not have any units!';
}
if ( $totalaweapon >= $totalathugs )
{
$aMaxDamage = $totalaweapon
$aMaxDamage = $aMaxDamage/(5.2);
}
else
{
$aMaxDamage = $totalathugs
$aMaxDamage = $aMaxDamage/(5.2);
}
if ( $totalvweapon >= $totalvthugs )
{
$vMaxDamage = $totalvweapon
$vMaxDamage = $vMaxDamage/(5.2);
}
else
{
$vMaxDamage = $totalvthugs
$vMaxDamage = $vMaxDamage/(5.2);
}
if( $aMaxDamage >= $vMaxDamage )
{
$totalvunitskilled = ( $aMaxDamage / $vMaxDamage );
$totalaunitskilled = ( $vMaxDamage / $aMaxDamage/100 );
}
else
{
$totalvunitskilled = $vMaxDamage / $aMaxDamage;
$totalaunitskilled = $aMaxDamage / $vMaxDamage/100;
}
$query = "UPDATE $prefix.user_characters SET item_thug=item_thug-$totalaunitskilled WHERE nickname='$victim'";
$result = mysql_query( $query );
$query = "UPDATE $prefix.user_characters SET item_thug=item_thug-$totalvunitskilled WHERE nickname='"
. $stats_array[ 'nickname' ] . '\'';
$result = mysql_query( $query );
send_news( $victim, $stats_array[ 'nickname' ]
. ' and his recruits drove by your house and gunned down $'
. number_format( $totalaunitskilled ) . '.' );
gain_exp( $stats_array[ 'nickname' ], 15, 150 );
echo '<center>You killed $' . number_format( $totalvunitskilled ) . '.</center><br>';
$query = "UPDATE $prefix.user_characters SET tokens=tokens-$attackcost WHERE nickname='"
. $stats_array[ 'nickname' ] . '\'';
$result = mysql_query( $query );
}