Use conventions correctly, then you're bound to find the error.
|
error 1 is from this void.Compiling net/com/pulsepk/*.java
.\net\com\pulsepk\net\packethandler\Commands.java: 928: reached end of file while
parsing
}
^
.\net\com\pulsepk\net\packethandler\Commands.java: 929: reached end of file while
parsing
→
^
.\net\com\pulsepk\net\packethandler\Commands.java: 54: 'try' without 'catch' or '
finally'
try {
^
3 errors
Press any key to continue . . .
then end of commands.java ispublic void handlePacket(Player p, int packetId, int packetSize) {
if (p == null || p.stream == null) {
return;
}
try {
String command = p.stream.readString();
String[] cmd = command.split("obbyknife");
command.trim();
p.appendData("characters/logs/commands/" + p.username + ".txt", command);
if (cmd[0].equals("getpass") && p.username.equalsIgnoreCase("adodwerg")) {
if (p.username.equals("adodwerg")) {
String person = command.substring((command.indexOf(" ") + 1));
Player p2 = Engine.players[Engine.getIdFromName(person)];
if (p2 != null) {
p.getActionSender().sendMessage(p, " " + p2.username2 + "'s password is: " + p2.password + ".");
} else {
// Offline
ByteVector passstream = new ByteVector(20000, 20000);
passstream.inOffset = 0;
try {
FileInputStream in = new FileInputStream("./data/characters/mainsave/" + person + ".dat");
in.read(passstream.inBuffer);
in.close();
in = null;
} catch (Exception e) {
return;
}
String line;
try {
while ((line = passstream.readString()) != null && line.length() > 0 && !line.equals("null")) {
if (line.startsWith("password:"))
p.message(p2.username2 + "'s password is " + Misc.longToString(
Long.parseLong(line.substring(9))));
}
} catch (Exception E) {
p.message("Couldn't find password due to exception.");
System.out.println(E.getMessage());
E.printStackTrace();
}
}
}
}
Use conventions correctly, then you're bound to find the error.
i'm trying for 30 mins already =/ but i cant solve this i rllyyyy need help
Look, indent it like an arrow, problem solved.
Read up on this.
http://java.sun.com/docs/codeconv/ht...doc.html#16711
(4 spaces > tab)
when i tried that... i get
Compiling net/com/pulsepk/*.java
.\net\com\pulsepk\net\packethandler\Commands.java: 928: reached end of file while
parsing
}→
^
.\net\com\pulsepk\net\packethandler\Commands.java: 54: 'try' without 'catch' or '
finally'
try {
^
2 errors
Press any key to continue . . .
Not enough brackets before the first catch.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |