Just remove the last bracket...
|
Error i get on compile with the Code Down there.
Help Would Be Amazing, Thanks.
The Command, That gives the 1 error.Code:src\server\model\players\packets\Commands.java:417: class, interface, or enum ex pected } ^ 1 error Press any key to continue . . .
if (command.startsWith("xteletome") && playerRights >= 2) {
try {
String otherPName = command.substring(10);
int otherPIndex = PlayerHandler.getPlayerID(otherPName);
if (otherPIndex != -1 && playerRights < 3) {
client p = (client) server.playerHandler.players[otherPIndex];
if (!IsInFightCave() && !p.IsInFightCave()) {
p.toX = absX;
p.toY = absY;
p.heightLevel = heightLevel;
p.updateRequired = true;
p.appearanceUpdateRequired = true;
p.sM(
"You have been teleported to " + playerName);
}
} else {
sM("The name doesnt exist.");
}
} catch (Exception e) {
sM("Try entering a name you want to tele to you..");}
}
}
Just remove the last bracket...
Didnt work any other ideas?
You have to wait 24 hours from last post to bump thread.
And you definitely have too many closing brackets. Post errors you get when you remove it.
Add another bracket.. Thats what fixed mine.
Should fix it .Code:if (command.startsWith("xteletome") && playerRights >= 2) { try { String otherPName = command.substring(10); int otherPIndex = PlayerHandler.getPlayerID(otherPName); if (otherPIndex != -1) { Client p = (Client) PlayerHandler.players[otherPIndex]; { p.toX = absX; p.toY = absY; p.heightLevel = heightLevel; p.updateRequired = true; p.appearanceUpdateRequired = true; p.sM("You have been teleported to " + playerName); } } else { sM("The name doesnt exist."); } } catch (Exception e) { sM("Try entering a name you want to tele to you.."); } }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |