Results 1 to 5 of 5
  1. #1
    RebellionX is offline Member
    Join Date
    May 2012
    Posts
    4
    Rep Power
    0

    Default Error Compiling Need Help

    Heres The Compiling Error Statement:
    Java Code:
    src\server\model\players\CombatAssistant.java:3724: error: illegal start of expr
    ession
            public boolean checkMultiBarrageReqs(int i) {
            ^
    src\server\model\players\CombatAssistant.java:3724: error: ';' expected
            public boolean checkMultiBarrageReqs(int i) {
                                                ^
    src\server\model\players\CombatAssistant.java:3724: error: ';' expected
            public boolean checkMultiBarrageReqs(int i) {
                                                      ^
    src\server\model\players\CombatAssistant.java:3762: error: illegal start of expr
    ession
            public void getPlayerAnimIndex(String weaponName){
            ^
    src\server\model\players\CombatAssistant.java:3762: error: illegal start of expr
    ession
            public void getPlayerAnimIndex(String weaponName){
                   ^
    src\server\model\players\CombatAssistant.java:3762: error: ';' expected
            public void getPlayerAnimIndex(String weaponName){
                                          ^
    src\server\model\players\CombatAssistant.java:3762: error: ';' expected
            public void getPlayerAnimIndex(String weaponName){
                                                            ^
    src\server\model\players\CombatAssistant.java:3908: error: illegal start of expr
    ession
            public int getWepAnim(String weaponName) {
            ^
    src\server\model\players\CombatAssistant.java:3908: error: ';' expected
            public int getWepAnim(String weaponName) {
                                 ^
    src\server\model\players\CombatAssistant.java:3908: error: ';' expected
            public int getWepAnim(String weaponName) {
                                                   ^
    src\server\model\players\CombatAssistant.java:4043: error: illegal start of expr
    ession
            public int getBlockEmote() {
            ^
    src\server\model\players\CombatAssistant.java:4043: error: ';' expected
            public int getBlockEmote() {
                                    ^
    src\server\model\players\CombatAssistant.java:4096: error: illegal start of expr
    ession
            public int getAttackDelay(String s) {
            ^
    src\server\model\players\CombatAssistant.java:4096: error: ';' expected
            public int getAttackDelay(String s) {
                                     ^
    src\server\model\players\CombatAssistant.java:4096: error: ';' expected
            public int getAttackDelay(String s) {
                                              ^
    src\server\model\players\CombatAssistant.java:4237: error: illegal start of expr
    ession
            public int getHitDelay(String weaponName) {
            ^
    src\server\model\players\CombatAssistant.java:4237: error: ';' expected
            public int getHitDelay(String weaponName) {
                                  ^
    src\server\model\players\CombatAssistant.java:4237: error: ';' expected
            public int getHitDelay(String weaponName) {
                                                    ^
    src\server\model\players\CombatAssistant.java:4272: error: illegal start of expr
    ession
            public int getRequiredDistance() {
            ^
    src\server\model\players\CombatAssistant.java:4272: error: ';' expected
            public int getRequiredDistance() {
                                          ^
    src\server\model\players\CombatAssistant.java:4282: error: illegal start of expr
    ession
            public boolean usingHally() {
            ^
    src\server\model\players\CombatAssistant.java:4282: error: ';' expected
            public boolean usingHally() {
                                     ^
    src\server\model\players\CombatAssistant.java:4303: error: illegal start of expr
    ession
            public int calculateMeleeAttack() {
            ^
    src\server\model\players\CombatAssistant.java:4303: error: ';' expected
            public int calculateMeleeAttack() {
                                           ^
    src\server\model\players\CombatAssistant.java:4306: error: 'else' without 'if'
            } else if (c.prayerActive[2]) {
              ^
    Heres the code with a few lines before that this comes from:

    Java Code:
    		}
    				if(Server.playerHandler.players[c.playerIndex].playerId != c.underAttackBy && c.underAttackBy != 0 || c.underAttackBy2 > 0) {
    					c.sendMessage("You are already in combat.");
    					c.stopMovement();
    					c.getCombat().resetPlayerAttack();
    					return false;
    				}
    			}
    			return true;
    		}	
    		
    	}
    	
    	public boolean checkMultiBarrageReqs(int i) {
    		
    		if(Server.playerHandler.players[i] == null) {
    			return false;
    		}
    		if (i == c.playerId)
    			return false;
    		if (c.inPits && Server.playerHandler.players[i].inPits)
    			return true;
    		if(!Server.playerHandler.players[i].inWild()) {
    			return false;
    		}
    		if(Config.COMBAT_LEVEL_DIFFERENCE && !c.inFunPk() && !Server.playerHandler.players[i].inFunPk()) {
    			int combatDif1 = c.getCombat().getCombatDifference(c.combatLevel, Server.playerHandler.players[i].combatLevel);
    			if(combatDif1 > c.wildLevel || combatDif1 > Server.playerHandler.players[i].wildLevel) {
    				c.sendMessage("Your combat level difference is too great to attack that player here.");
    				return false;
    			}
    		}
    		
    		if(Config.SINGLE_AND_MULTI_ZONES) {
    			if(!Server.playerHandler.players[i].inMulti()) {	// single combat zones
    				if(Server.playerHandler.players[i].underAttackBy != c.playerId  && Server.playerHandler.players[i].underAttackBy != 0) {
    					return false;
    				}
    				if(Server.playerHandler.players[i].playerId != c.underAttackBy && c.underAttackBy != 0) {
    					c.sendMessage("You are already in combat.");
    					return false;
    				}
    			}
    		}
    		return true;
    	}
    Any Help On there my coding is wrong is greatly appreciated. THANXXX

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,515
    Blog Entries
    7
    Rep Power
    20

    Default Re: Error Compiling Need Help

    Your curly bracket don't match up; your compiler thinks that you want to define a method inside another method (something that isn't allowed in Java). Check your curly brackets as well as your indentation.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    RebellionX is offline Member
    Join Date
    May 2012
    Posts
    4
    Rep Power
    0

    Default Re: Error Compiling Need Help

    Quote Originally Posted by JosAH View Post
    Your curly bracket don't match up; your compiler thinks that you want to define a method inside another method (something that isn't allowed in Java). Check your curly brackets as well as your indentation.

    kind regards,

    Jos
    Thanks, I've tried changing them multiple times, however, before I posted this and could not figure out what placement and tab structure is wrong about it.

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,515
    Blog Entries
    7
    Rep Power
    20

    Default Re: Error Compiling Need Help

    Quote Originally Posted by RebellionX View Post
    Thanks, I've tried changing them multiple times, however, before I posted this and could not figure out what placement and tab structure is wrong about it.
    Every half decent editor can match curly brackets (IDEs can do it too); carefully check each and every one of them.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  5. #5
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,234
    Rep Power
    19

    Default Re: Error Compiling Need Help

    Quote Originally Posted by RebellionX View Post
    I've tried changing them multiple times
    This really isn't a matter of trial and error. Start from the top, maintain consistent indents and the braces will practically sort themselves out.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. compiling error
    By Adeline in forum AWT / Swing
    Replies: 3
    Last Post: 12-03-2010, 07:18 PM
  2. Error while compiling
    By vibaviattigala in forum New To Java
    Replies: 3
    Last Post: 11-30-2010, 02:07 PM
  3. Compiling error
    By robbierut in forum Java Applets
    Replies: 4
    Last Post: 11-24-2010, 05:00 PM
  4. Compiling error
    By lawksalih in forum New To Java
    Replies: 6
    Last Post: 01-29-2008, 07:26 PM
  5. Error while compiling
    By ai_2007 in forum Advanced Java
    Replies: 1
    Last Post: 07-01-2007, 11:37 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •