I'm adding barrows and I get this Null Pointer..
Code:
Starting Impact Pk on 0.0.0.0:43594
ClientHandler: Accepted from localhost:4769
Core has connected
Core - actionbutton: 21247
Core - actionbutton: 24133
playerCommand: tele 3564 3288
playerCommand: pickup 952 1
objectType: 6821
Exception in thread "main" java.lang.NullPointerException
at server.npcs.NPCHandler.process(NPCHandler.java:445)
at server.Server.main(Server.java:27)
ClientHandler: Accepted from localhost:4779
Core has connected
Read it and went to NPCHandler line 445 and here it is...
Code:
Client o = (Client) Server.playerHandler.players[c.killerId];
if(o != null) {
if (npcs[i].npcType == 2025 || npcs[i].npcType == 2026 || npcs[i].npcType == 2027 || npcs[i].npcType == 2028 || npcs[i].npcType == 2029 || npcs[i].npcType == 2030) {
o.BarrowskillCount++;
}
if (npcs[i].npcType == 2025) {
o.Ahrim = true;
o.sendMessage("You have defeated Ahrim!");
}
if (npcs[i].npcType == 2026) {
o.Dharok = true;
o.sendMessage("You have defeated Dharok!");
}
if (npcs[i].npcType == 2027) {
o.Guthan = true;
o.sendMessage("You have defeated Guthan!");
}
if (npcs[i].npcType == 2028) {
o.Karil = true;
o.sendMessage("You have defeated Karil!");
}
if (npcs[i].npcType == 2029) {
o.Torag = true;
o.sendMessage("You have defeated Torag!");
}
if (npcs[i].npcType == 2030) {
o.Verac = true;
o.sendMessage("You have defeated Verac!");
}
}
Not seeing really anything wrong with it...
Any help anyone?