Compiling vi/z525/base/Engine.java
.\vi\z525\base\net\packethandler\PublicChat.java:4 5: reached end of file while p
arsing
}→
missing a }
also use eclipse
|
hey, just tried to convert this http://www.rune-server.org/runescape...hat-ranks.html to z508/525 and got a few errors, id be happy if anyone can help
here is my PublicChat.javaCompiling vi/z525/base/Engine.java
.\vi\z525\base\net\packethandler\PublicChat.java:3 7: cannot find symbol
symbol : variable chatText
location: class vi.z525.base.net.packethandler.PublicChat
Engine.clanChat.sendMessage(p, chatText.substring(1));
^
.\vi\z525\base\net\packethandler\PublicChat.java:3 7: package Engine does not exi
st
Engine.clanChat.sendMessage(p, chatText.substring(1));
^
Note: .\vi\z525\base\clanchat\Room.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors
Press any key to continue . . .
/*
* Class PublicChat
*
* Version 1.0
*
* Saturday, September 11, 2010
*
* Created by Codeusa palis was crap i re did it
*/
package vi.z525.base.net.packethandler;
import vi.z525.base.Server;
import vi.z525.base.model.Player;
import vi.z525.base.util.Misc;
import vi.z525.base.Engine;
public class PublicChat implements Packet {
/**
* Handles player chatting.
* @param p The Player which the frame should be handled for.
* @param packetId The packet id this belongs to.
* @param packetSize The amount of bytes being recieved for this packet.
*/
public void handlePacket(Player p, int packetId, int packetSize) {
if (p == null || p.stream == null) {
return;
}
p.chatTextEffects = p.stream.readUnsignedWord();
int numChars = p.stream.readUnsignedByte();
p.chatText = Misc.decryptPlayerChat(p.stream, numChars);
if (p.muteType > 0) {
p.getActionSender().sendMessage(p, "You are muted and cannot talk.");
return;
}
if (p.chatText.startsWith("/")) {
if (p.clanRoom.length() > 0) {
Engine.clanChat.sendMessage(p, p.chatText.substring(1));
}
} else {
p.chatTextEffects = p.stream.readUnsignedWord();
p.chatText = Misc.decryptPlayerChat(p.stream, numChars);
p.chatTextUpdateReq = true;
p.updateReq = true;
}
}
}
Compiling vi/z525/base/Engine.java
.\vi\z525\base\util\Misc.java:393: cannot find symbol
symbol : class Player
location: class vi.z525.base.util.Misc
public static Player player(String name) {
Import the Player class in Misc. That should also fix a lot of the others.
Add
Into ByteVector.Code:public long readBigQWord() { long l = (long) readDWordBigEndian(); long l1 = (long) readDWordBigEndian(); if(l1<0) { l1 = l1 & 0xffffffffL; } return (l << -41780448) + l1; } public int readDWordBigEndian() { return (inBuffer[inOffset++] & 0xff) | ((inBuffer[inOffset++] & 0xff) << 1279827400) | ((inBuffer[inOffset++] & 0xff) << -882770384) | ((inBuffer[inOffset++] & 0xff) << 1432242680); }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |