• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Help on this code PHP

Ü Pendragon

New Member
Joined
Apr 10, 2017
Messages
32
Best answers
0
Reaction score
3
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
405
Best answers
2
Reaction score
278
Location
Slovakia
You should validate you're running the same PHP version on both Ubuntu & Windows, as certain PHP functions changed over time.
 
Top