Enjoy an ad free experience by logging in. Not a member yet? Register.


Results 16 to 25 of 25
Thread: Coding a Forum Level Up System

01232013, 09:24 PM #16
 Join Date
 Jan 2013
 Posts
 12
 Thanks
 0
 Thanked 0 Times in 0 Posts
Okay, then please explain where you got 50. It should quite clearly be 2500 because as I said earlier, I calculated these based on a post count of 50.
I find it funny that you claim to be a mathematician but get these simple things utterly wrong.

01232013, 09:29 PM #17
 Join Date
 Jan 2013
 Location
 Germany
 Posts
 578
 Thanks
 4
 Thanked 77 Times in 77 Posts
Oops – in my head I just had EXP = 50 instead of EXP = 50 * 50. Well, in any case that would make it be 500. Not the 200 you for whatever reason expect.
However, comments like
I find it funny that you claim to be a mathematician but get these simple things utterly wrong.
Bye.Last edited by Airblader; 01232013 at 09:34 PM.

01232013, 09:46 PM #18
 Join Date
 Jan 2013
 Posts
 12
 Thanks
 0
 Thanked 0 Times in 0 Posts
Help me? You've been nothing but condescending this whole time. I'm new at this, and your attitude has not been helping.
And no, by the way, 500*1.15^12 does not equal 3000. Nice try though?

01232013, 09:51 PM #19
 Join Date
 Jan 2013
 Location
 Germany
 Posts
 578
 Thanks
 4
 Thanked 77 Times in 77 Posts

01232013, 10:30 PM #20
Okay...
Code:var xpup = (xneeded * Math.ceil(Math.pow(1.15, plevel))) var showxp= (xpup  (xneeded * Math.ceil(Math.pow(1.15, plevel1)))) NewCode = topR + midR + name + ": " + sign +" "+ plevel + "<BR> XP: "+ (EXPshowxp) +"<BR> Experience needed: " + (xpupEXP)+ "<BR>Overall Experience:" + (xneeded * EXP / xneeded) +"<br><! placeholder ><br><br>"
Code:xpup = 500 * Math.ceil( Math.pow(1.15, 12) ) ==>> xpup = 500 * Math.ceil( 5.35 ) ==>> xpup = 500 * 6 ==>> xpup = 3000 showxp= (xpup  (xneeded * Math.ceil(Math.pow(1.15, plevel1)))) ==>> showxp = (3000  (500 * Math.ceil( Math.pow( 1.15, 11 ) ) ) ) ==>> showxp = (3000  (500 * Math.ceil( 4.65 ) ) ) ==>> showxp = (3000  (500 * 5) ) ==>> showxp = 3000  2500 ==>> showxp = 500 NewCode = "...other stuff..."+ plevel + "<BR> XP: "+ (EXPshowxp) + "<BR> Experience needed: " + (xpupEXP) + "<BR>Overall Experience:" + (xneeded * EXP / xneeded) + ... NewCode = "...other stuff..."+ 12 + "<BR> XP: "+ (2500500) + "<BR> Experience needed: " + (3000500) + "<BR>Overall Experience:" + (500 * 2500 / 500) + ... NewCode = "...other stuff..."+ 12 + "<BR> XP: "+ 2000 + "<BR> Experience needed: " + 2500 + "<BR>Overall Experience:" + 2500 + ...
(xneeded * EXP / xneeded)
Pointless. The two uses of xneeded cancel out, so the value is always simply EXP.An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.

01232013, 10:32 PM #21
Last edited by Old Pedant; 01232013 at 10:36 PM.
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.

01232013, 11:59 PM #22
 Join Date
 Jan 2013
 Posts
 12
 Thanks
 0
 Thanked 0 Times in 0 Posts
The (xneeded * EXP/xneeded) was there in the original coding.
Okay, so my dumb head head thought it was rounding it up to 2700. Actually I'm not sure where I got that impression, to be honest. Thank you for specifying why was becoming 3000.
Is there a way to make it round up just to the next number divisible by 50?

01242013, 12:26 AM #23
var xpup = 50 * Math.ceil( 500 * Math.pow(1.15, plevel) / 50 );
For a plevel of 12, that give xpup of 2700.
var showxp= xpup  50 * Math.ceil( 500 * Math.pow(1.15, plevel1) / 50 );
Again, for a plevel of 12 (with xpup of 2700) that will do
var showxp = 2700  2350;
or
showxp = 350An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.

01242013, 12:31 AM #24
And then
Code:NewCode = "...other stuff..."+ plevel + "<BR> XP: "+ (EXPshowxp) + "<BR> Experience needed: " + (xpupEXP) + "<BR>Overall Experience:" + (xneeded * EXP / xneeded) + ... NewCode = "...other stuff..."+ 12 + "<BR> XP: "+ (2500350) + "<BR> Experience needed: " + (27002500) + "<BR>Overall Experience:" + (500 * 2500 / 500) + ... NewCode = "...other stuff..."+ 12 + "<BR> XP: "+ 2150 + "<BR> Experience needed: " + 200 + "<BR>Overall Experience:" + 2500 + ...
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.

01242013, 01:50 AM #25
 Join Date
 Jan 2013
 Posts
 12
 Thanks
 0
 Thanked 0 Times in 0 Posts
Okay, I actually think I get that. It worked, thanks!