# sos sos sos

#### fengxue0108

##### Member
hi friends , i have a quastion about serverperks why my demolish perk explosive experience <0 when i got 71 LV
but sharpshooter is right
and i set the maxperks=251

Last edited:

#### Toblerone

##### FNG / Fresh Meat
This is because Server Perks supports up to 200 Millions of damage, when you earn more than that, it starts making problems. To fix that you will have to edit ServerPerksP.u.

You can fix that by doing this:
Find the function static function int GetPerkProgressInt( ClientPerkRepLink StatOther, out int FinalInt, byte CurLevel, byte ReqNum )

In this function you will see a default formula that will calculate how much damage you will need for the final level. In your case it is 251.

default:
FinalInt = X + GetDoubleScaling(CurLevel, Y); //Where X and Y are some numbers

You will have to calculate the max damage to be 200 Millions.
GetDoubleScaling = Your max level - 6 = 251 - 6 = 245
Therefore:
FinalInt = X + 245 * 245 * Y
You have to play with these X and Y numbers to get it right. Use the calculator to do that.

• fengxue0108

#### fengxue0108

##### Member
Toblerone;n2265790 said:
This is because Server Perks supports up to 200 Millions of damage, when you earn more than that, it starts making problems. To fix that you will have to edit ServerPerksP.u.

You can fix that by doing this:
Find the function static function int GetPerkProgressInt( ClientPerkRepLink StatOther, out int FinalInt, byte CurLevel, byte ReqNum )

In this function you will see a default formula that will calculate how much damage you will need for the final level. In your case it is 251.

default:
FinalInt = X + GetDoubleScaling(CurLevel, Y); //Where X and Y are some numbers

You will have to calculate the max damage to be 200 Millions.
GetDoubleScaling = Your max level - 6 = 251 - 6 = 245
Therefore:
FinalInt = X + 245 * 245 * Y
You have to play with these X and Y numbers to get it right. Use the calculator to do that.

first thank you , but i also do not know "X" mean

#### Toblerone

##### FNG / Fresh Meat
fengxue0108;n2267645 said:
first thank you , but i also do not know "X" mean

X is a number, any number.

For example, look at this code:

Code:
``````class SRVetDemolitions extends SRVeterancyTypes
abstract;

static function int GetPerkProgressInt( ClientPerkRepLink StatOther, out int FinalInt, byte CurLevel, byte ReqNum )
{
switch( CurLevel )
{
case 0:
FinalInt = 10000;
break;
case 1:
FinalInt = 25000;
break;
case 2:
FinalInt = 100000;
break;
case 3:
FinalInt = 500000;
break;
case 4:
FinalInt = 1500000;
break;
case 5:
FinalInt = 3500000;
break;
case 6:
FinalInt = 5500000;
break;
default:
FinalInt = 5500000+GetDoubleScaling(CurLevel,500000);
}
return Min(StatOther.RExplosivesDamageStat,FinalInt);
}``````

What you have to do is calculate the max damage. In your case you have 251 MAX LVLS.

FinalInt = 5500000+GetDoubleScaling(CurLevel,500000);

Therefore FinalInt = 5 500 000 + 245 * 245 * 500 000

FinalInt = 30 018 000 000 DAMAGE required for level 251
Decrease 500 000 and 5 500 000 to make it work.