Jump to content
  • 0

Exception ?!


Question

Posted

i have this error on GS, i don't really now what causes this.

java.lang.ArrayIndexOutOfBoundsException: 103
        at net.sf.l2j.gameserver.skills.Formulas$FuncMaxHpMul.calc(Formulas.java
:638)
        at net.sf.l2j.gameserver.skills.Calculator.calc(Calculator.java:184)
        at net.sf.l2j.gameserver.model.actor.stat.CharStat.calcStat(CharStat.jav
a:102)
        at net.sf.l2j.gameserver.model.actor.stat.CharStat.getMaxHp(CharStat.jav
a:252)
        at net.sf.l2j.gameserver.model.actor.stat.PcStat.getMaxHp(PcStat.java:31
0)
        at net.sf.l2j.gameserver.model.actor.status.CharStatus.setCurrentHp(Char
Status.java:359)
        at net.sf.l2j.gameserver.model.actor.status.CharStatus.setCurrentHp(Char
Status.java:351)
        at net.sf.l2j.gameserver.model.actor.status.CharStatus.reduceHp(CharStat
us.java:179)
        at net.sf.l2j.gameserver.model.actor.status.PlayableStatus.reduceHp(Play
ableStatus.java:44)
        at net.sf.l2j.gameserver.model.actor.status.PcStatus.reduceHp(PcStatus.j
ava:110)
        at net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.reduceCurrent
Hp(L2PcInstance.java:9253)
        at net.sf.l2j.gameserver.skills.effects.EffectDamOverTime.onActionTime(E
ffectDamOverTime.java:69)
        at net.sf.l2j.gameserver.model.L2Effect.scheduleEffect(L2Effect.java:432
)
        at net.sf.l2j.gameserver.model.L2Effect$EffectTask.run(L2Effect.java:152
)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source)

        at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
access$101(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
runPeriodic(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source
)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

2 answers to this question

Recommended Posts

  • 0
Posted

If you search a bit you will found the explanation

 

Thrown to indicate that an array has been accessed with an illegal index.

 

The index is either negative or greater than or equal to the size of the array.

  • 0
Posted

I fixed it, THANKS

 

Index: /Others/Gm Pack/Game v2.2/java/net/sf/l2j/gameserver/skills/Formulas.java
===================================================================
--- /Others/Gm Pack/Game v2.2/java/net/sf/l2j/gameserver/skills/Formulas.java (revision 619)
+++ /Others/Gm Pack/Game v2.2/java/net/sf/l2j/gameserver/skills/Formulas.java (revision 633)
@@ -1627,10 +1624,12 @@

	public double calcSkillStatModifier(SkillType type, L2Character target)
	{
		double multiplier = 1;
		if (type == null) return multiplier;
+		try
+		{
		switch (type)
		{
			case STUN:
			case BLEED:
				multiplier = 2 - Math.sqrt(CONbonus[target.getCON()]);
@@ -1650,10 +1649,14 @@
				multiplier = 2 - Math.sqrt(MENbonus[target.getMEN()]);
				break;
			default:
				return multiplier;
		}
+		} catch (ArrayIndexOutOfBoundsException e)
+		{
+			_log.warning("Character "+target.getName()+" has been set (by a GM?) a MEN or CON stat value out of accepted range");
+		}
		if (multiplier < 0)
			multiplier = 0;
		return multiplier;
	}

Guest
This topic is now closed to further replies.


×
×
  • Create New...