Warning (2): Division by zero [APP\Controller\PlayerHitZonesController.php, line 39]Code Context $n = count($hitZones);
for ($i = 0; $i < $n; $i++) {
$percentage = $hitZones[$i]['PlayerHitZone']['kills'] / $totalKills;
$playerID = '31'
$hitZones = array(
(int) 0 => array(
'PlayerHitZone' => array(
'id' => '104',
'bodypart_id' => '4',
'player_id' => '31',
'kills' => '0',
'deaths' => '1',
'teamkills' => '0',
'teamdeaths' => '0',
'suicides' => '0'
),
'BodyPart' => array(
'id' => '4',
'name' => 'head',
'kills' => '1547',
'teamkills' => '27',
'suicides' => '1'
)
),
(int) 1 => array(
'PlayerHitZone' => array(
'id' => '106',
'bodypart_id' => '9',
'player_id' => '31',
'kills' => '0',
'deaths' => '1',
'teamkills' => '0',
'teamdeaths' => '0',
'suicides' => '0'
),
'BodyPart' => array(
'id' => '9',
'name' => 'right_leg_upper',
'kills' => '1130',
'teamkills' => '6',
'suicides' => '0'
)
)
)
$hitZone = array(
'PlayerHitZone' => array(
'id' => '106',
'bodypart_id' => '9',
'player_id' => '31',
'kills' => '0',
'deaths' => '1',
'teamkills' => '0',
'teamdeaths' => '0',
'suicides' => '0'
),
'BodyPart' => array(
'id' => '9',
'name' => 'right_leg_upper',
'kills' => '1130',
'teamkills' => '6',
'suicides' => '0'
)
)
$kills = array(
(int) 0 => '0',
(int) 1 => '0'
)
$totalKills = (int) 0
$n = (int) 2
$i = (int) 0
PlayerHitZonesController::view() - APP\Controller\PlayerHitZonesController.php, line 39
ReflectionMethod::invokeArgs() - [internal], line ??
Controller::invokeAction() - CORE\Cake\Controller\Controller.php, line 499
Dispatcher::_invoke() - CORE\Cake\Routing\Dispatcher.php, line 193
Dispatcher::dispatch() - CORE\Cake\Routing\Dispatcher.php, line 167
[main] - APP\webroot\index.php, line 97
Warning (2): Division by zero [APP\Controller\PlayerHitZonesController.php, line 39]Code Context $n = count($hitZones);
for ($i = 0; $i < $n; $i++) {
$percentage = $hitZones[$i]['PlayerHitZone']['kills'] / $totalKills;
$playerID = '31'
$hitZones = array(
(int) 0 => array(
'PlayerHitZone' => array(
'id' => '104',
'bodypart_id' => '4',
'player_id' => '31',
'kills' => '0',
'deaths' => '1',
'teamkills' => '0',
'teamdeaths' => '0',
'suicides' => '0',
'percentage' => false
),
'BodyPart' => array(
'id' => '4',
'name' => 'head',
'kills' => '1547',
'teamkills' => '27',
'suicides' => '1'
)
),
(int) 1 => array(
'PlayerHitZone' => array(
'id' => '106',
'bodypart_id' => '9',
'player_id' => '31',
'kills' => '0',
'deaths' => '1',
'teamkills' => '0',
'teamdeaths' => '0',
'suicides' => '0'
),
'BodyPart' => array(
'id' => '9',
'name' => 'right_leg_upper',
'kills' => '1130',
'teamkills' => '6',
'suicides' => '0'
)
)
)
$hitZone = array(
'PlayerHitZone' => array(
'id' => '106',
'bodypart_id' => '9',
'player_id' => '31',
'kills' => '0',
'deaths' => '1',
'teamkills' => '0',
'teamdeaths' => '0',
'suicides' => '0'
),
'BodyPart' => array(
'id' => '9',
'name' => 'right_leg_upper',
'kills' => '1130',
'teamkills' => '6',
'suicides' => '0'
)
)
$kills = array(
(int) 0 => '0',
(int) 1 => '0'
)
$totalKills = (int) 0
$n = (int) 2
$i = (int) 1
$percentage = false
PlayerHitZonesController::view() - APP\Controller\PlayerHitZonesController.php, line 39
ReflectionMethod::invokeArgs() - [internal], line ??
Controller::invokeAction() - CORE\Cake\Controller\Controller.php, line 499
Dispatcher::_invoke() - CORE\Cake\Routing\Dispatcher.php, line 193
Dispatcher::dispatch() - CORE\Cake\Routing\Dispatcher.php, line 167
[main] - APP\webroot\index.php, line 97
Body Part |
Kills |
Deaths |
head |
0 |
1 |
right_leg_upper |
0 |
1 |