RuneTrack Forums
It is currently Mon Mar 10, 2025 6:29 pm

All times are UTC [ DST ]




Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Mon Nov 08, 2010 2:40 pm 
Offline

Joined: Sat Nov 06, 2010 11:39 am
Posts: 4
Hi,

Unfortunately, Skiller, Zarfot (97914252727i) and Jdelacroix have all passed 2,147,483,647 experience total:

http://runetrack.com/progress.php?user=skiller
http://runetrack.com/progress.php?user=9791425727i
http://runetrack.com/progress.php?user=Jdelacroix

Which is the highest number in JavaScript, I believe? So their progress graphs stop once they're passed this number. Any way to get round this?

On a related note, for some reason on this page:

http://runetrack.com/progress.php?user=Telmomarques

The data point for October 16th is in between July 28th and July 29th, leading to an odd spike in the graph.


Top
 Profile  
 
PostPosted: Mon Nov 22, 2010 7:11 am 
Offline
Site Admin

Joined: Sat Jun 06, 2009 12:38 am
Posts: 546
Hi Jim360,

Thanks for letting me know about this. The fix was actually much easier than I imagined.

2,147,483,647 is not the maximum value of any programming language per se, but you see it come up a lot as it's the maximum value an integer can typically hold. Integers are usually 4 bytes, the same as 32 bits (8 bits to a byte), meaning they can go up to 2^32 in value unsigned (or ((2^32)/2)-1 signed, as half of them go to the negative end and zero counts towards the positive end). (2^32)/2)-1 = 2,147,483,647, so that's where that limit comes from.

Anyway, as I had the data point values cast as integers, I just set them as un-casted PHP values instead, which have a much higher range.

Also fixed the issue with Telmomarques' graph - not exactly sure why that point was appearing out of place, but it's all fixed now. :)

_________________
ImageImage


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: dvdgett3 and 119 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group