it sets my config to PHP: coins: 988.000000 i want PHP: coins: 988 and the mutlipe thingy wont work code: PHP: $cfg->set("coins", $cfg->get("coins") - Shop::get()->pay * $data[0]); $cfg->save(); $inv->addItem($item); $player->sendMessage(C::GREEN . "You bought $data[0] " . $item->getName() . "'s for " . Shop::get()->pay * $data[0] . " coins."); it wont multipe $data[0] and the pay
round() still returns a float http://php.net/manual/en/function.round.php You will need to int-cast it.
(int) only truncates the number. It doesn't round the number. They are different behaviours. Not that I am saying which one is working.
Fair point, don't really know what the integer should be rounded to but he only specified a number with trailing zeroes and wanted to remove the zeroes, so I guess an int casting would be sufficient from the information given.