So I've added this method:
Code:
public void displayItem(int frame, int item, int slot, int amount) {
c.outStream.createFrameVarSizeWord(34);
c.outStream.writeWord(frame);
c.outStream.writeByte(slot);
c.outStream.writeWord(item+1);
c.outStream.writeByte(255);
c.outStream.writeDWord(amount);
c.outStream.endFrameVarSizeWord();
}
which is supposed to be the frame method for displaying items on an interface, but every time I call this packet through a command,
Code:
if (playerCommand.startsWith("iof")) {
c.getPA().displayItem(12140, 1050, 0, 240); // frame id, item Id, slot, zoom
c.sendMessage("CHECK");
}
My client throws a NullPointerException at line 11473 in my client class.
Code:
case 34:
needDrawTabArea = true;
int i9 = inStream.readUnsignedWord();
RSInterface class9_2 = RSInterface.interfaceCache[i9];
while(inStream.currentOffset < pktSize) {
int j20 = inStream.method422();
int i23 = inStream.readUnsignedWord();
int l25 = inStream.readUnsignedByte();
if(l25 == 255)
l25 = inStream.readDWord();
if(j20 >= 0 && j20 < class9_2.inv.length) {
class9_2.inv[j20] = i23;
class9_2.invStackSizes[j20] = l25;
}
}
pktType = -1;
return true;
Here's the exception being thrown:
Code:
java.lang.NullPointerException
at client.parsePacket(client.java:11473)
at client.mainGameProcessor(client.java:2691)
at client.processGameLoop(client.java:1989)
at RSApplet.run(RSApplet.java:101)
at client.run(client.java:4402)
at java.lang.Thread.run(Unknown Source)
Base is galkon's
Could anyone help?