Jump to content
  • 0
Sign in to follow this  
ryan191

Error help with SpiritTree

Question

Hey guys,

Can someone help me with this error?

starting...
src\com\rs\net\decoders\handlers\ObjectHandler.java:533: error: 'else' without
if'
else if (id == 68974)
^
src\com\rs\net\decoders\handlers\ObjectHandler.java:1613: error: 'else' without
'if'
else if (id == 68974)
^
2 errors
Press any key to continue . . .


-Ryan

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0
Post the line both on line 533 and 1613 in actual content, or use pastebin

Share this post


Link to post
Share on other sites
  • 0
<spoiler>
if (hunterNpc != null) {
if (OwnedObjectManager.removeObject(player, object)) {
player.setNextAnimation(hunterNpc.getEquipment().getPickUpAnimation());
player.getInventory().getItems().addAll(hunterNpc.getItems());
player.getInventory().addItem(hunterNpc.getEquipment().getId(), 1);
player.getSkills().addXp(Skills.HUNTER, hunterNpc.getXp());
} else {
player.getPackets().sendGameMessage("This isn't your trap.");
}
} else if (id == HunterEquipment.BOX.getObjectId() || id == 19192) {
if (OwnedObjectManager.removeObject(player, object)) {
player.setNextAnimation(new Animation(5208));
player.getInventory().addItem(HunterEquipment.BOX.getId(), 1);
} else {
player.getPackets().sendGameMessage("This isn't your trap.");
}
} else if (id == HunterEquipment.BRID_SNARE.getObjectId() || id == 19174) {
if (OwnedObjectManager.removeObject(player, object)) {
player.setNextAnimation(new Animation(5207));
player.getInventory().addItem(HunterEquipment.BRID_SNARE.getId(), 1);
} else {
player.getPackets().sendGameMessage("This isn't your trap.");
}
} else if (id == 2350
&& (object.getX() == 3352 && object.getY() == 3417 && object
.getPlane() == 0)) {
player.useStairs(832, new WorldTile(3177, 5731, 0), 1, 2);
} else if (id == 2353
&& (object.getX() == 3177 && object.getY() == 5730 && object
.getPlane() == 0)) {
player.useStairs(828, new WorldTile(3353, 3416, 0), 1, 2);
} else if (id == 11554 || id == 11552) {
player.getPackets().sendGameMessage(
"That rock is currently unavailable.");
else if (id == 68974)
player.getDialogueManager().startDialogue("SpiritTreeD");
else if (id == 1317)
player.getDialogueManager().startDialogue("SpiritTreeD");
else if (id == 68973)
player.getDialogueManager().startDialogue("SpiritTreeD");
} else if (id == 38279) {
player.getDialogueManager().startDialogue("RunespanPortalD");
} else if (id == 2491) {
player.getActionManager()
.setAction(
new EssenceMining(
object,
player.getSkills().getLevel(
Skills.MINING) < 30 ? EssenceDefinitions.Rune_Essence
: EssenceDefinitions.Pure_Essence));
</spoiler>

<spoiler>if (!player.getControlerManager().processObjectClick2(object)) {
return;
} else if (object.getDefinitions().containsOption("Smelt")) {
player.getDialogueManager().startDialogue("SmeltingD", object);
} else if (object.getDefinitions().name.equalsIgnoreCase("furnace")) {
player.getDialogueManager().startDialogue("SmeltingD", object);
} else if (id == 17010) {
player.getDialogueManager().startDialogue("LunarAltar");
else if (id == 68974)
SpiritTree.openSpiritTree(player);
else if (id == 1317)
SpiritTree.openSpiritTree(player);
else if (id == 68973)
SpiritTree.openSpiritTree(player);
} else if (id == 6) {
player.getCannon().pickUpDwarfCannon(object);
}</spoiler>

Share this post


Link to post
Share on other sites
  • 0
Spoiler tags start with [ - not < same with closing tag ] instead of >

Just use [URL="http://pastebin.com"]pastebin[/URL] mate of the entire objecthandler.

On topic: Have you tried using the appropriate open and close brackets for the else if statements? Edited by Daedalus

Share this post


Link to post
Share on other sites
  • 0
i fixed the errors, but my spirit tree still doesn't work Edited by ryan191

Share this post


Link to post
Share on other sites
  • 0
[quote name='ryan191']i fixed the errors, but my spirit tree still doesn't work[/QUOTE]

We can't do anything without code. Just post the class.

Share this post


Link to post
Share on other sites
Sign in to follow this  

×