Wrong calculations?
#3

this is my new formula, after changing stuff to floats...
Quote:

forward Float:GET_RANK_POINTS(Float:rank);
stock Float:GET_RANK_POINTS(Float:rank) {
new Floatoints;
points = rank/7.0;
new Float:floatpoints = floatpower(2.0,points);
points = rank+400.0*floatround(floatpoints);
return points;
}

and this is my test command code to get xp for all ranks...

Quote:

for(new i = 0; i <= 100; i++) {
printf("%f: %f",Float:i,GET_RANK_POINTS(i));
}

and these are my new xp results from test.. (top couple again)...

the results are a bit more normal now (not the first few, they still weird, but some of the higher xp is more normal, and growing nicely), but still getting lots of 0000's after the result... and the index of loop is just returning 0.0000. Why is this :O? And thanks for the help btw, +rep !

Quote:

[21:46:13] 0.000000: 400.000000
[21:46:13] 0.000000: 401.000000
[21:46:13] 0.000000: 402.000000
[21:46:13] 0.000000: 403.000000
[21:46:13] 0.000000: 404.000000
[21:46:13] 0.000000: 805.000000
[21:46:13] 0.000000: 806.000000
[21:46:13] 0.000000: 807.000000
[21:46:13] 0.000000: 808.000000
[21:46:13] 0.000000: 809.000000
[21:46:13] 0.000000: 1210.000000
[21:46:13] 0.000000: 1211.000000
[21:46:13] 0.000000: 1212.000000
[21:46:13] 0.000000: 1613.000000
[21:46:13] 0.000000: 1614.000000
[21:46:13] 0.000000: 1615.000000
[21:46:13] 0.000000: 2016.000000
[21:46:13] 0.000000: 2017.000000
[21:46:13] 0.000000: 2418.000000
[21:46:13] 0.000000: 2819.000000
[21:46:13] 0.000000: 2820.000000
[21:46:13] 0.000000: 3221.000000
[21:46:13] 0.000000: 3622.000000
[21:46:13] 0.000000: 4023.000000
[21:46:13] 0.000000: 4424.000000

xp is still a bit odd, not really going up gradually, it's going up in big jumps.


###########################################
EDIT:

Silly me, left the floatround() function in, removed that and it works like a charm! Thanks again vince!
Reply


Messages In This Thread
Wrong calculations? - by wooolly - 02.03.2015, 20:35
Re: Wrong calculations? - by Vince - 02.03.2015, 20:59
Re: Wrong calculations? - by wooolly - 02.03.2015, 21:20
AW: Re: Wrong calculations? - by Nero_3D - 02.03.2015, 22:42
Re: Wrong calculations? - by wooolly - 02.03.2015, 22:56

Forum Jump:


Users browsing this thread: 1 Guest(s)