Jump to content
  • 0

[Warning] Overflow Detected


Question

Posted
[Warning]: script:op_2num: overflow detected op=C_MUL i1=121500000 i2=35
[Debug]: Source (NPC): leveling_control (invisible/not on a map)
[Warning]: script:op_2num: overflow detected op=C_MUL i1=91260000 i2=35
[Debug]: Source (NPC): leveling_control (invisible/not on a map)

The script that's cause this Warning:

 

- script leveling_control -1,{
OnNPCKillEvent:

.@range = BaseLevel - getmonsterinfo( killedrid, MOB_LV );
.@range = .@range < 0 ? -.@range : .@range;

if ( .@range < 10 ) {

.@base = getmonsterinfo( killedrid, MOB_BASEEXP );
.@job  = getmonsterinfo( killedrid, MOB_JOBEXP  );

if ( .@base > 0 )

set BaseExp, BaseExp + .@base * 35 / 100;

if ( .@job  > 0 )

set JobExp , JobExp  + .@job  * 35 / 100;

}

end;
}

This script will give to every char in game, a bonus of 0.35% in exp for killing other players.

1 answer to this question

Recommended Posts

Posted

I'm... confused with your script to be fair. You get the warning because 91260000 * 35 = 3194100000, which is greater than 2147483648. If you want to give 0.35% exp, you could use the following instead :

 

BaseExp += NextBaseExp / 10000 * 35;

  • Upvote 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...