Jump to content

Adding decimal to stats


Recommended Posts

If you mean in the userstats table, yes it shows.

For instance:

Strength Agility Guard Labour

4099.5098 1136.0560 915.0077 1984.4896

This is an example of a users stats in the userstats table.

I'm guessing its something in the index.php that is rounding off the numbers but I cannot find it, this is the only reference i see close.


Also in the gym, when you train it gives the decimal values, but only on the outcome message, before you train if you look at your current stats while in the gym it shows XXXX.0000

So it does show the decimal values but its been rounded off.

Correction, the gym does in fact show the correct decimal values, i was looking at my own stats which i do not train so it was .0000 by default, but after training it did show the decimal values, so I'm going to have a look at the gym.php and see if i can see why it is working correctly there but not on the index.php

Edited by Smokey
Link to comment
Share on other sites

It seems removing this from index.php allows the .0000 to show on the homepage, but it stays all zero's and does not pull this from the database, so I'm guessing I need to change "number_format" but to what I do not know, "decimal_format" surely does not work lol.








Link to comment
Share on other sites

If you had read my post I am already using number_format, and that is rounding it off, which is what I am trying to change, I do NOT want it rounded, I want the decimal to show. And please excuse the double post, this was only because I edited the post above several times and the "double" post was to show my final findings, I don't normally double post. I posted in the Support section because I have already checked php.net and did not find the information I am seeking.

Link to comment
Share on other sites

Just because I'm new to php doesn't mean I'm an idiot :P, as I said thats what I assumed and was the first place I looked. And there is no number_format function there. Here is a list of every single function in global_func and as you see there is no number_format function, unless one of these doubles as the number formatter, and my global_func is default, I have not added any functions to it since I bought the codes last week.

function DateTime_Parse

function money_formatter

function itemtype_dropdown

function item_dropdown

function item2_dropdown

function location_dropdown

function shop_dropdown

function user_dropdown

function challengebot_dropdown

function fed_user_dropdown

function mailb_user_dropdown

function job_dropdown

function jobrank_dropdown

function house_dropdown

function house2_dropdown

function course_dropdown

function crime_dropdown

function crimegroup_dropdown

function event_add

function mysql_escape

function check_level

function get_rank

function item_add

function item_remove

function forum_dropdown

function forum2_dropdown

function make_bigint

function stafflog_add

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...