Jump to content
  • 0

[Warning] Overflow Detected


Tales

Question


  • Group:  Members
  • Topic Count:  163
  • Topics Per Day:  0.03
  • Content Count:  319
  • Reputation:   8
  • Joined:  02/05/12
  • Last Seen:  

[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.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  697
  • Reputation:   724
  • Joined:  11/12/12
  • Last Seen:  

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
Link to comment
Share on other sites

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.

×
×
  • Create New...