Shakeynath Posted July 18, 2010 Posted July 18, 2010 Now ive had a comment from a player saying his exp is sticking at 97% and he cant level anymore. We thought it was just his account but then we tested it and it would level. Any ideas ? Quote
NarutoPRG.com Posted July 18, 2010 Posted July 18, 2010 I think you might have a bug in your header.php(if that's possible). :) Quote
Analog Posted July 18, 2010 Posted July 18, 2010 Probably hitting the max value of the defined data type for the database field exp Quote
Shakeynath Posted July 18, 2010 Author Posted July 18, 2010 Users reach 9999999.9999 exp then it stops ? Quote
Uridium Posted July 19, 2010 Posted July 19, 2010 How are they hitting that amount so quickly ? Created:2009-10-26 Expires:2011-10-26 Updated:2010-03-22 Its less than a year old Quote
Haunted Dawg Posted July 19, 2010 Posted July 19, 2010 Change the EXP to bigint: ALTER TABLE `users` CHANGE `exp` `exp` BIGINT(1024) UNSIGNED DEFAULT '0'; Then, go into global_func.php, find your user_level() function, and modify that also to fit the BIGINT. Quote
Shakeynath Posted July 19, 2010 Author Posted July 19, 2010 I can change the exp to big int but cant find the user_level in global_func for me too change it there, Can someone help me please Quote
Shakeynath Posted July 19, 2010 Author Posted July 19, 2010 find this: function user_level( I dont have that in my global_func :S Quote
Danny696 Posted July 19, 2010 Posted July 19, 2010 Heres what to do: Find: $ir['exp_needed']=(int) (($ir['level']+1)*($ir['level']+1)*($ir['level']+1)*2.2); replace with: $ir['exp_needed']=(bigint) (($ir['level']+1)*($ir['level']+1)*($ir['level']+1)*2.2); I think :/ Quote
Shakeynath Posted July 19, 2010 Author Posted July 19, 2010 My exp field was on DECIMAL(11,4) Not INT :S:S:S Quote
Haunted Dawg Posted July 19, 2010 Posted July 19, 2010 Then change it to DECIMAL(99,4) Then go find check_level() function in global_func.php. Then as danny has said, instead replace with: $ir['exp_needed'] = intval(($ir['level']+1)*($ir['level']+1)*($ir['level']+1)*2.2); That should allow them to go up to quite a huge amount. Quote
Shakeynath Posted July 19, 2010 Author Posted July 19, 2010 Should it be: $ir['exp_needed'] = intval(($ir['level']+1)*($ir['level']+1)*($ir['level']+1)*2.2); Or $ir['exp_needed'] =(intval) (($ir['level']+1)*($ir['level']+1)*($ir['level']+1)*2.2); ??? Quote
Shakeynath Posted July 19, 2010 Author Posted July 19, 2010 Error SQL query: ALTER TABLE `users` CHANGE `exp` `exp` DECIMAL( 99, 4 ) NOT NULL DEFAULT '0.0000' MySQL said: Documentation #1426 - Too big precision 99 specified for column 'exp'. Maximum is 65. Quote
Danny696 Posted July 19, 2010 Posted July 19, 2010 Run this: ALTER TABLE `users` CHANGE `exp` `exp` DECIMAL( 65, 4 ) NOT NULL DEFAULT '0.0000' Quote
Haunted Dawg Posted July 19, 2010 Posted July 19, 2010 $ir['exp_needed'] = intval(($ir['level']+1)*($ir['level']+1)*($ir['level']+1)*2.2); It should be that, and run the query Danny has provided above, and you'll be on your way. Quote
Zero-Affect Posted July 19, 2010 Posted July 19, 2010 wow danny i thought the max of dec was 64 not 65 Quote
Danny696 Posted July 19, 2010 Posted July 19, 2010 MySQL said: Documentation #1426 - Too big precision 99 specified for column 'exp'. Maximum is 65. I only got it from that, i've never had to make it bigger Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.