just saying, I think if you really understood what that formula did, you would know exactly how to implement it... so let me explain a bit more in-depth in case you haven't been in algebra 1 (according to the education system here in california).
An arithmetic progression is a sequence in which the difference between one term and the next is the same. That means a simple sequence, like <1,2,3,4,5,...> or <3,6,9,12,...> or in this case <5,10,15,20,...>. The odd thing here is that that sequence represents the amount by which the needed experience increases each level. We want to find the value of needed experience. So, to do that, we find the sum of the function
change in needed exp = 5*lvl
So, if you're in
If the needed exp of level 1 is 10, then the needed exp will be this:
10+5=15
If you're going from lv 2 to 3:
10+5+10=25
if you're going from lv 3 to 4:
10+5+10+15=40
so, you can see that the sequence is the sum of all the terms of 5*lvl. In "sigma" notation, we would say this:
total experience needed at level L to advance to the next level = [img]http://www.neurofuzzydev.com/cgi-bin/mimetex.cgi?10%2B%20%5Csum_%7B%7Bn%7D%3D%7BL%7D%7D^%7BL%7D5%20%5Ccdot%20n-5.gif[/img]
which, through math (!!!), we can determine is equal to:
[img]http://www.neurofuzzydev.com/cgi-bin/mimetex.cgi?L \cdot \left(L-1\right) \cdot \frac{5}{2} +10[/img]
You get that by simplifying that sigma notation doohickey.
I'm just saying this, because its not totally obvious, and you should know *why* you're doing something. Even if you don't know the notation or math behind it (I just barely do), you should realize that you're dealing with the sum of a bunch of numbers, and realize that what you're doing in the program solves for that sum.
errm, if you already know all this, then whatever. At least I got to try out embedding math statements xD