I run the program, from what I see the game runs fine. Then when I click on the object that suppose to send a dialogue, it disconnects me and throws this error in the run.batch window.
Exception in thread "main" java.lang.NullPointerException
at NPCDialogue.UpdateNPCChat(NPCDialogue.java:18)
at client.process(client.java:8471)
at PlayerHandler.process(PlayerHandler.java:137)
at server.main(server.java:55)
Here is what I have in those files, I wont put the PlayerHandler.java or server.java because thats just calling the file NPCDialogue.java.
This is what is inside NPCDialogue.java.
public client c;
public Player P;
public void UpdateNPCChat() {
/*c.sendFrame126("", 4902);
c.sendFrame126("", 4903);
c.sendFrame126("", 4904);
c.sendFrame126("", 4905);
c.sendFrame126("", 4906);*/
That's line 18-> c.sendFrame126("", 976);
switch (P.NpcDialogue) {
}
}
Note: I would of posted the entire void, but its too big.
This is what I have in Client.java.
if (NpcDialogue > 0 && NpcDialogueSend == false) {
This is line 8471-> server.NPCDialogue.UpdateNPCChat();
}
public void sendFrame126(String s, int id) {
if (id <= 20000) {
if (InterfaceText[id] != null && InterfaceText[id].equals(s)) {
return;
} else {
InterfaceText[id] = s;
}
}
outStream.createFrameVarSizeWord(126);
outStream.writeString(s);
outStream.writeWordA(id);
outStream.endFrameVarSizeWord();
flushOutStream();
}
--------------------------------------------------------------------------------------
This is another java.lang.nullpointer exception error I get. This happens when I click on the item I want to eat to heal myself.
java.lang.NullPointerException at CheckSkillHandler.CheckForSkillUse3(CheckSkillHandler.java:1382)
at PacketHandler.parseIncomingPackets(PacketHandler.java:800)
at client.parseIncomingPackets(client.java:8526)
at client.packetProcess(client.java:8510)
at client.process(client.java:8480)
at PlayerHandler.process(PlayerHandler.java:137)
at server.main(server.java:55)
pimpscape Server [fatal] - exception
This is what I have for CheckSkillHandler.java.
case 385: //Shark
This is line 1382-> c.healing[1] = 20;
c.healing[2] = 20;
c.healing[3] = -1;
break;
Note: I would of posted the entire void, but its too big again.
This is what I have in PacketHandler.java.
case 122: // Call for burying bones
int interfaace = c.inStream.readSignedWordBigEndianA();
int ItemSlot = c.inStream.readUnsignedWordA();
int ItemID = c.inStream.readUnsignedWordBigEndian();
/*if (P.IsUsingSkill == false && c.CheckForSkillUse3(ItemID, ItemSlot) == true) {
P.IsUsingSkill = true;
}*/
if(c.playerItems[ItemSlot] == ItemID+1){
this is line 800->server.CheckSkillHandler.CheckForSkillUse3(ItemID, ItemSlot);
This is what I have in client.java.
public void parseIncomingPackets(){
int i;
int junk;
int junk2;
int junk3;
line 8526->server.PacketHandler.parseIncomingPackets(this, this);
switch(packetType) {
}
}
line 8510-> parseIncomingPackets();
packetType = -1;
} catch(java.lang.Exception __ex) { __ex.printStackTrace(); disconnected = true;
System.out.println("pimpscape Server [fatal] - exception"); }
return true;
}
}
line 8480-> return packetProcess();
}
Well I hope you guys can help hopefully. Thank you.