strexp()
var/K=rand(7,13)-str/9
K*=5
if(village=="Leaf"&&leafpriority=="Training"||village=="Sand "&&sandpriority=="Training"||village=="Sound"&&soundpriority==" Training")K=K*1.2
if(village=="Leaf")K=K*(leafrep/100)
if(village=="Sand")K=K*(sandrep/100)
if(village=="Sound")K=K*(soundrep/100)
if(skillhardworker)K=K*(1.05+skillhardworker*0.05)
if(rank=="Hokage"||rank=="Kazekage"||rank=="Sound Leader")K=K*0.75
if(sharingan>=2)K=K*1.1
if(K<1)K=1
strexp+=K
if(strexp>=100)
var/J=strexp-100
strexp=J
str++
exp++
src<<"
if(exp>=maxexp)levelup()
Problem description:
Well, its like this when a person gets over 100 xp it stacks it so like this
it has 1000 strexp he lvls it up 10 lvls but i want it to be that it imidediatly levels not after he trained a bit
i tried to change this var/J=strexp-100 to var/J=strexp==0
but that just made it gain 1 level
</1>
If you want someone to immediately level after doing something, just call <small>src.level ++<small> in the proc whenever said proc is called.