Jump to content
  • 0

[Help]Import Problem


Question

Posted

i try to import one Jython script

i dont see error when server load script but in game

when i press on npc to start script show me next error..

any ideas why and how to fix?

 

 

 

Bad RequestBypassToServer: 
java.lang.NullPointerException
at com.l2jarchid.gameserver.model.quest.QuestState.getStateId(QuestState.java:184)
at com.l2jarchid.gameserver.model.quest.Quest.createQuestInDb(Quest.java:823)
at com.l2jarchid.gameserver.model.quest.Quest.newQuestState(Quest.java:188)
at com.l2jarchid.gameserver.model.actor.instance.L2NpcInstance.showQuestWindow(L2NpcInstance.java:1367)
at com.l2jarchid.gameserver.model.actor.instance.L2NpcInstance.onBypassFeedback(L2NpcInstance.java:1011)
at com.l2jarchid.gameserver.network.clientpackets.RequestBypassToServer.runImpl(RequestBypassToServer.java:556)
at com.l2jarchid.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:78)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)

4 answers to this question

Recommended Posts

  • 0
Posted

NPE.

that are like

 

Indian watching Pc :)

 

btw this error send me first time when i click on NPC if i click again everything is OK without errors and script work

  • 0
Posted

that are like

 

Indian watching Pc :)

 

btw this error send me first time when i click on NPC if i click again everything is OK without errors and script work

 

NPE is thrown when an application attempts to use null in a case where an object is required.

 

Just check error log (for lines) check those lines and find object which may be null.

 

I will give you an example.

 

Lets say you have ID of the sample clan, lets say:

 

private int clanId = 1234;

 

And now you would receive object of this clan (with this id, so we will create new object of L2Clan)

 

L2Clan sampleClan = ClanTable.getInstance().getClan(clanId);

 

In this case you will receive object of the clan with some kind of it (id 1234 in this case)

 

But wait, if we want to use this object somehow, we should remember that it may return NULL!

 

When for example? For example clan with this ID doesn't exist in database.

 

So there should be NPE check, for example:

 

if (sampleClan == null)
       return;

 

Hope you will now understand how does it work.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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