It's obviously because your loop doesn't execute.
You assign the value of the level in the variable lvl let's assume it's 1.
Now you assign the value of the newlevel in i which is the level +1 so 2.
Here
Code:
for (int i = newlevel; i < lvl; i++)
You check if i (2) is less than lvl(1) which is obviously false
thus the loop doesn't execute.
also the loop useless since two lines above you add only 1 which is not
a variable so the loop will always execute once.
I strongly recommend learning simple math before trying to code.