post the class or method.
|
I'm trying to add global announcement when someone gets a rare drop...Code:src\server\model\npcs\NPCHandler.java:2347: error: class, interface, or enum exp ected if (NPCDrops.dropRarity.get(npcs[i].npcType) != null) { ^ src\server\model\npcs\NPCHandler.java:2350: error: class, interface, or enum exp ected Server.itemHandler.createGroundItem(c, N PCDrops.rareDrops.get(npcs[i].npcType)[random][0], npcs[i].absX, npcs[i].absY, N PCDrops.rareDrops.get(npcs[i].npcType)[random][1], c.playerId); ^ src\server\model\npcs\NPCHandler.java:2351: error: class, interface, or enum exp ected Server.clanChat.handleLootShare(c, NPCDr ops.rareDrops.get(npcs[i].npcType)[random][0], NPCDrops.rareDrops.get(npcs[i].np cType)[random][1]); ^ src\server\model\npcs\NPCHandler.java:2352: error: class, interface, or enum exp ected } else { ^ src\server\model\npcs\NPCHandler.java:2354: error: class, interface, or enum exp ected Server.itemHandler.createGroundItem(c, N PCDrops.normalDrops.get(npcs[i].npcType)[random][0], npcs[i].absX, npcs[i].absY, NPCDrops.normalDrops.get(npcs[i].npcType)[random][1], c.playerId); ^ src\server\model\npcs\NPCHandler.java:2355: error: class, interface, or enum exp ected } ^ src\server\world\ClanChatHandler.java:420: error: reached end of file while pars ing } ^ 7 errors Press any key to continue . . .
Thanks and rep+
post the class or method.
Here's the method:
Code:if (NPCDrops.dropRarity.get(npcs[i].npcType) != null) { if (rareDrops(i)) { int random = Misc.random(NPCDrops.rareDrops.get(npcs[i].npcType).length-1); Server.itemHandler.createGroundItem(c, NPCDrops.rareDrops.get(npcs[i].npcType)[random][0], npcs[i].absX, npcs[i].absY, NPCDrops.rareDrops.get(npcs[i].npcType)[random][1], c.playerId); Server.clanChat.handleLootShare(c, NPCDrops.rareDrops.get(npcs[i].npcType)[random][0], NPCDrops.rareDrops.get(npcs[i].npcType)[random][1]); } else { int random = Misc.random(NPCDrops.normalDrops.get(npcs[i].npcType).length-1); Server.itemHandler.createGroundItem(c, NPCDrops.normalDrops.get(npcs[i].npcType)[random][0], npcs[i].absX, npcs[i].absY, NPCDrops.normalDrops.get(npcs[i].npcType)[random][1], c.playerId); } } }
here, deleted a bracket.
Code:if (NPCDrops.dropRarity.get(npcs[i].npcType) != null) { if (rareDrops(i)) { int random = Misc.random(NPCDrops.rareDrops.get(npcs[i].npcType).length-1); Server.itemHandler.createGroundItem(c, NPCDrops.rareDrops.get(npcs[i].npcType)[random][0], npcs[i].absX, npcs[i].absY, NPCDrops.rareDrops.get(npcs[i].npcType)[random][1], c.playerId); Server.clanChat.handleLootShare(c, NPCDrops.rareDrops.get(npcs[i].npcType)[random][0], NPCDrops.rareDrops.get(npcs[i].npcType)[random][1]); } else { int random = Misc.random(NPCDrops.normalDrops.get(npcs[i].npcType).length-1); Server.itemHandler.createGroundItem(c, NPCDrops.normalDrops.get(npcs[i].npcType)[random][0], npcs[i].absX, npcs[i].absY, NPCDrops.normalDrops.get(npcs[i].npcType)[random][1], c.playerId); } }
Still getting this error
Code:src\server\model\npcs\NPCHandler.java:2347: error: class, interface, or enum exp ected if (NPCDrops.dropRarity.get(npcs[i].npcType) != null) { ^ src\server\model\npcs\NPCHandler.java:2350: error: class, interface, or enum exp ected Server.itemHandler.createGroundItem(c, N PCDrops.rareDrops.get(npcs[i].npcType)[random][0], npcs[i].absX, npcs[i].absY, N PCDrops.rareDrops.get(npcs[i].npcType)[random][1], c.playerId); ^ src\server\model\npcs\NPCHandler.java:2351: error: class, interface, or enum exp ected Server.clanChat.handleLootShare(c, NPCDr ops.rareDrops.get(npcs[i].npcType)[random][0], NPCDrops.rareDrops.get(npcs[i].np cType)[random][1]); ^ src\server\model\npcs\NPCHandler.java:2352: error: class, interface, or enum exp ected } else { ^ src\server\model\npcs\NPCHandler.java:2354: error: class, interface, or enum exp ected Server.itemHandler.createGroundItem(c, N PCDrops.normalDrops.get(npcs[i].npcType)[random][0], npcs[i].absX, npcs[i].absY, NPCDrops.normalDrops.get(npcs[i].npcType)[random][1], c.playerId); ^ src\server\model\npcs\NPCHandler.java:2355: error: class, interface, or enum exp ected } ^ src\server\world\ClanChatHandler.java:420: error: reached end of file while pars ing } ^ 7 errors Press any key to continue . . .
Post the whole class for me. I'll take a quick peek.
Edit* And also your clanchathandler.java. If you can, put it in pastebin.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |