diff --git a/placestats.php b/placestats.php index d2f430b..a302aa7 100644 --- a/placestats.php +++ b/placestats.php @@ -24,11 +24,13 @@ $gameinfo['owneruuid'] = ""; // calculate artifact score $gameinfo['artifact'] = 0; -$templife = $gameinfo['currentlife']; -while ($templife > 100) { - $gameinfo['artifact']++; - $templife -= 75; +if ($gameinfo['currentlife'] > 100) { + $templife = $gameinfo['currentlife']; + while ($templife > 100) { + $gameinfo['artifact'] ++; + $templife -= 75; + } } $data['stats'] = $gameinfo; -echo json_encode($data); \ No newline at end of file +echo json_encode($data);