...well at least the parseint thing wasn't me!
Alright, so, Let's say the person has 50 posts. That makes EXP 50 * 50 = 2500. The xneeded value is a fixed 500.
That makes the level 12. The first equation should be outputting 200 according to that. The second should be giving out 2150. Instead what I'm getting is 500 and 2000. It's basically ignoring everything I've changed, including the plevel values, and doing what would have made sense in the original code.