Thread: 7 Errors, they're annoying

Results 1 to 7 of 7
  1. #1 7 Errors, they're annoying 
    Donator
    Rev3rt's Avatar
    Join Date
    Nov 2009
    Posts
    1,913
    Thanks given
    82
    Thanks received
    95
    Rep Power
    0
    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 . . .
    I'm trying to add global announcement when someone gets a rare drop...

    Thanks and rep+
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    May 2012
    Age
    28
    Posts
    1,548
    Thanks given
    415
    Thanks received
    231
    Rep Power
    81
    post the class or method.
    Inactive.


    Spoiler for FirstDesign:
    Reply With Quote  
     

  3. #3  
    Registered Member
    maffia-rpg's Avatar
    Join Date
    Jul 2011
    Posts
    2,775
    Thanks given
    587
    Thanks received
    759
    Rep Power
    120
    Missing one bracket or added one to much.
    Quote Originally Posted by Nando View Post
    why would I care about trying to get you to care about me homosexual?
    back to coding shit revisions
    1080% lost.
    Reply With Quote  
     

  4. #4  
    Donator
    Rev3rt's Avatar
    Join Date
    Nov 2009
    Posts
    1,913
    Thanks given
    82
    Thanks received
    95
    Rep Power
    0
    Quote Originally Posted by xLoeluex View Post
    post the class or method.
    Quote Originally Posted by maffia-rpg View Post
    Missing one bracket or added one to much.
    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);
    				}	
    			}		
    		}
    Reply With Quote  
     

  5. #5  
    Registered Member

    Join Date
    May 2012
    Age
    28
    Posts
    1,548
    Thanks given
    415
    Thanks received
    231
    Rep Power
    81
    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);
    				}	
    			}
    Inactive.


    Spoiler for FirstDesign:
    Reply With Quote  
     

  6. #6  
    Donator
    Rev3rt's Avatar
    Join Date
    Nov 2009
    Posts
    1,913
    Thanks given
    82
    Thanks received
    95
    Rep Power
    0
    Quote Originally Posted by xLoeluex View Post
    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 . . .
    Reply With Quote  
     

  7. #7  
    Registered Member

    Join Date
    May 2012
    Age
    28
    Posts
    1,548
    Thanks given
    415
    Thanks received
    231
    Rep Power
    81
    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.
    Inactive.


    Spoiler for FirstDesign:
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Remove please
    By rockarocka in forum Help
    Replies: 0
    Last Post: 02-16-2013, 02:29 AM
  2. Stupid annoying t2 errors.
    By Kenneh in forum Help
    Replies: 2
    Last Post: 04-13-2010, 12:18 AM
  3. Annoying errors
    By CTucker in forum Help
    Replies: 5
    Last Post: 10-15-2009, 09:09 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •