Jump to content
MakeWebGames

Recommended Posts

Posted

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 ?

Posted

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.

Posted

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 :/

Posted

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.

Posted

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);

???

Posted

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.

Join the conversation

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

Guest
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...