Board Thread:Support Requests - Getting Technical/@comment-3271569-20130329202855

Hi again, I was wondering if someone known an easy short way to code this in an expr. I currently got this: Or in simply language: Earn+EarnB*(lv-1)

Now my problem comes afther level 10. Than the value change:

To this: Earn+EarnB*9+EarnB/2*(lv-10)

The problem is the rounding. EarnB/2 need to be round ceil on the values 11, 13, 15, 17, ... when they need to be ceil on 12, 14, 16, .... In fact you get this: Earn+EarnB*9+ceil(EarnB/2)+floor(EarnB/2)+ceil(EarnB/2) for level 13

Does anyone known an eay code for this problem? It's an bit of anyoing to code 30 switch lines for this

Current code (yes there is an bug inside this one) What makes this source kinda useless:  