Help on this code PHP

Lawyer

New Member
Joined
Apr 10, 2017
Messages
20
Best answers
0
Reaction score
1
Guys, I base myself on a system already made to make what is shown in the image work. I work in windows with xampp but when I pass it to Ubuntu 16.04 it is not working. Someone knows?
I use Gesior 2012 - Server TFS 1.3

$hpPercent = max(0, min(100, $player->getHealth() / max(1, $player->getHealthMax()) * 100));
$manaPercent = max(0, min(100, $player->getMana() / max(1, $player->getManaMax()) * 100));
$expCurrent = Functions::getExpForLevel($player->getLevel());
$expNext = Functions::getExpForLevel($player->getLevel() + 1);
$expLeft = bcsub($expNext, $player->getExperience(), 0);
$expLeftPercent = max(0, min(100, ($player->getExperience() - $expCurrent) / ($expNext - $expCurrent) * 100));
 

Attachments

Jacobs

Webdev, mapper
Joined
Jun 22, 2014
Messages
404
Best answers
2
Reaction score
276
Location
Slovakia
You should validate you're running the same PHP version on both Ubuntu & Windows, as certain PHP functions changed over time.
 
Top