Thread: Exp rate

Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1 Exp rate 
    Project-Tenex Developer Uzumaki's Avatar
    Join Date
    Oct 2011
    Posts
    130
    Thanks given
    27
    Thanks received
    6
    Rep Power
    17
    How can I make it so that no one follows the same exp rate? What would I do to this:
    Code:
    Config.MELEE_EXP_RATE = 5000;
    To make it only apply to a single player
    For example I want 1 player to get 5000 xp per hit and another to get 500 xp per hit
    How would I do that?


    I have tried this:
    Code:
    		public static int MELEE_EXP_RATE = 0;
    		if c.easyMode = true {
    		config.MELEE_EXP_RATE += 5000;
    		} else if c.mediumMode = true {
    		config.MELEE_EXP_RATE += 500;
    		} else if c.hardMode = true {
    		config.MELEE_EXP_RATE += 50;
    		} else if c.extremeMode = true {
    		config.MELEE_EXP_RATE += 10;
    		}
    But I get these errors:
    Code:
    src\server\Config.java:66: illegal start of type
                    if c.easyMode = true {
                    ^
    src\server\Config.java:66: ';' expected
                    if c.easyMode = true {
                      ^
    src\server\Config.java:66: illegal start of type
                    if c.easyMode = true {
                        ^
    src\server\Config.java:66: ';' expected
                    if c.easyMode = true {
                                        ^
    src\server\Config.java:68: illegal start of type
                    } else if c.mediumMode = true {
                      ^
    src\server\Config.java:68: ';' expected
                    } else if c.mediumMode = true {
                          ^
    src\server\Config.java:68: <identifier> expected
                    } else if c.mediumMode = true {
                                          ^
    src\server\Config.java:68: ';' expected
                    } else if c.mediumMode = true {
                                                 ^
    src\server\Config.java:70: illegal start of type
                    } else if c.hardMode = true {
                      ^
    src\server\Config.java:70: ';' expected
                    } else if c.hardMode = true {
                          ^
    src\server\Config.java:70: <identifier> expected
                    } else if c.hardMode = true {
                                        ^
    src\server\Config.java:70: ';' expected
                    } else if c.hardMode = true {
                                               ^
    src\server\Config.java:72: illegal start of type
                    } else if c.extremeMode = true {
                      ^
    src\server\Config.java:72: ';' expected
                    } else if c.extremeMode = true {
                          ^
    src\server\Config.java:72: <identifier> expected
                    } else if c.extremeMode = true {
                                           ^
    src\server\Config.java:72: ';' expected
                    } else if c.extremeMode = true {
                                                  ^
    16 errors
    Press any key to continue . . .
    Anyone know how to make that work?
    Quote Originally Posted by Grim Reaper View Post


    I need help with this..... Does anyone know how to fix this.
    You serious..?
    __________________________________________________ __________________________________________________ _________________________________________
    Quote Originally Posted by SeanQB View Post
    Thanks! And the error in your sig shouldn't matter when compiling. I get the same thing all the time and my files still work.
    Quote Originally Posted by SeanQB View Post
    What's so funny?
    Reply With Quote  
     

  2. #2  
    Registered Member Cruel Hand's Avatar
    Join Date
    May 2012
    Posts
    90
    Thanks given
    5
    Thanks received
    16
    Rep Power
    54
    haha, I know how to fix this error, but not the other one we were having.

    the boolean value in an if statement has to be enclosed in parenthesis

    if (easyMode) {
    }else if (mediumMode) {
    } else if(hardMode) {
    } else if (extremeMode) {}
    Reply With Quote  
     

  3. #3  
    Project-Tenex Developer Uzumaki's Avatar
    Join Date
    Oct 2011
    Posts
    130
    Thanks given
    27
    Thanks received
    6
    Rep Power
    17
    Ok this is what I put:
    Code:
    		public static int MELEE_EXP_RATE = 0;
    if (easyMode) {
    config.MELEE_EXP_RATE += 5000;
    }else if (mediumMode) {
    config.MELEE_EXP_RATE += 500;
    } else if(hardMode) {
    config.MELEE_EXP_RATE += 50;
    } else if (extremeMode) {
    config.MELEE_EXP_RATE += 10;
    }
    And these are the errors:
    Code:
    src\server\Config.java:66: illegal start of type
    if (easyMode) {
    ^
    src\server\Config.java:66: <identifier> expected
    if (easyMode) {
                ^
    src\server\Config.java:68: illegal start of type
    }else if (mediumMode) {
     ^
    src\server\Config.java:68: ';' expected
    }else if (mediumMode) {
         ^
    src\server\Config.java:68: illegal start of type
    }else if (mediumMode) {
             ^
    src\server\Config.java:68: ';' expected
    }else if (mediumMode) {
                        ^
    src\server\Config.java:70: illegal start of type
    } else if(hardMode) {
      ^
    src\server\Config.java:70: ';' expected
    } else if(hardMode) {
          ^
    src\server\Config.java:70: illegal start of type
    } else if(hardMode) {
             ^
    src\server\Config.java:70: ';' expected
    } else if(hardMode) {
                      ^
    src\server\Config.java:72: illegal start of type
    } else if (extremeMode) {
      ^
    src\server\Config.java:72: ';' expected
    } else if (extremeMode) {
          ^
    src\server\Config.java:72: illegal start of type
    } else if (extremeMode) {
              ^
    src\server\Config.java:72: ';' expected
    } else if (extremeMode) {
                          ^
    14 errors
    Press any key to continue . . .
    Quote Originally Posted by Grim Reaper View Post


    I need help with this..... Does anyone know how to fix this.
    You serious..?
    __________________________________________________ __________________________________________________ _________________________________________
    Quote Originally Posted by SeanQB View Post
    Thanks! And the error in your sig shouldn't matter when compiling. I get the same thing all the time and my files still work.
    Quote Originally Posted by SeanQB View Post
    What's so funny?
    Reply With Quote  
     

  4. #4  
    Registered Member Cruel Hand's Avatar
    Join Date
    May 2012
    Posts
    90
    Thanks given
    5
    Thanks received
    16
    Rep Power
    54
    the if statements have to be in a method
    Reply With Quote  
     

  5. #5  
    Banned

    Join Date
    Jun 2009
    Posts
    2,916
    Thanks given
    169
    Thanks received
    806
    Rep Power
    0
    Quote Originally Posted by I Win View Post
    Ok this is what I put:
    Code:
    		public static int MELEE_EXP_RATE = 0;
    if (easyMode) {
    config.MELEE_EXP_RATE += 5000;
    }else if (mediumMode) {
    config.MELEE_EXP_RATE += 500;
    } else if(hardMode) {
    config.MELEE_EXP_RATE += 50;
    } else if (extremeMode) {
    config.MELEE_EXP_RATE += 10;
    }
    And these are the errors:
    Code:
    src\server\Config.java:66: illegal start of type
    if (easyMode) {
    ^
    src\server\Config.java:66: <identifier> expected
    if (easyMode) {
                ^
    src\server\Config.java:68: illegal start of type
    }else if (mediumMode) {
     ^
    src\server\Config.java:68: ';' expected
    }else if (mediumMode) {
         ^
    src\server\Config.java:68: illegal start of type
    }else if (mediumMode) {
             ^
    src\server\Config.java:68: ';' expected
    }else if (mediumMode) {
                        ^
    src\server\Config.java:70: illegal start of type
    } else if(hardMode) {
      ^
    src\server\Config.java:70: ';' expected
    } else if(hardMode) {
          ^
    src\server\Config.java:70: illegal start of type
    } else if(hardMode) {
             ^
    src\server\Config.java:70: ';' expected
    } else if(hardMode) {
                      ^
    src\server\Config.java:72: illegal start of type
    } else if (extremeMode) {
      ^
    src\server\Config.java:72: ';' expected
    } else if (extremeMode) {
          ^
    src\server\Config.java:72: illegal start of type
    } else if (extremeMode) {
              ^
    src\server\Config.java:72: ';' expected
    } else if (extremeMode) {
                          ^
    14 errors
    Press any key to continue . . .
    Code:
    public static int GET_MELEE_EXP_RATE() {
    	if (mediumMode)
    		return 500;
    	else if(hardMode)
    		return 50;
    	else if (extremeMode)
    		return 10;
    	return 5000;
    }
    Reply With Quote  
     

  6. #6  
    Project-Tenex Developer Uzumaki's Avatar
    Join Date
    Oct 2011
    Posts
    130
    Thanks given
    27
    Thanks received
    6
    Rep Power
    17
    Quote Originally Posted by iQuality View Post
    Code:
    public static int GET_MELEE_EXP_RATE() {
    	if (mediumMode)
    		return 500;
    	else if(hardMode)
    		return 50;
    	else if (extremeMode)
    		return 10;
    	return 5000;
    }
    Code:
    src\server\Config.java:66: cannot find symbol
    symbol  : variable easyMode
    location: class server.Config
            if (easyMode)
                ^
    src\server\Config.java:68: cannot find symbol
    symbol  : variable mediumMode
    location: class server.Config
            else if (mediumMode)
                     ^
    src\server\Config.java:70: cannot find symbol
    symbol  : variable hardMode
    location: class server.Config
            else if(hardMode)
                    ^
    src\server\Config.java:72: cannot find symbol
    symbol  : variable extremeMode
    location: class server.Config
            else if (extremeMode)
                     ^
    Note: Some input files use unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    4 errors
    Press any key to continue . . .
    Quote Originally Posted by Grim Reaper View Post


    I need help with this..... Does anyone know how to fix this.
    You serious..?
    __________________________________________________ __________________________________________________ _________________________________________
    Quote Originally Posted by SeanQB View Post
    Thanks! And the error in your sig shouldn't matter when compiling. I get the same thing all the time and my files still work.
    Quote Originally Posted by SeanQB View Post
    What's so funny?
    Reply With Quote  
     

  7. #7  
    Banned

    Join Date
    Jun 2009
    Posts
    2,916
    Thanks given
    169
    Thanks received
    806
    Rep Power
    0
    Code:
    public static int GET_MELEE_EXP_RATE(Client player) {
    	if (player.mediumMode)
    		return 500;
    	else if(player.hardMode)
    		return 50;
    	else if (player.extremeMode)
    		return 10;
    	return 5000;
    }
    player.java add

    public boolean mediumMode, hardMode, extremeMode;
    Reply With Quote  
     

  8. #8  
    Project-Tenex Developer Uzumaki's Avatar
    Join Date
    Oct 2011
    Posts
    130
    Thanks given
    27
    Thanks received
    6
    Rep Power
    17
    Nvm got all errors fixed but I don't get any exp when I hit something?
    Quote Originally Posted by Grim Reaper View Post


    I need help with this..... Does anyone know how to fix this.
    You serious..?
    __________________________________________________ __________________________________________________ _________________________________________
    Quote Originally Posted by SeanQB View Post
    Thanks! And the error in your sig shouldn't matter when compiling. I get the same thing all the time and my files still work.
    Quote Originally Posted by SeanQB View Post
    What's so funny?
    Reply With Quote  
     

  9. #9  
    Banned

    Join Date
    Jun 2009
    Posts
    2,916
    Thanks given
    169
    Thanks received
    806
    Rep Power
    0
    Quote Originally Posted by I Win View Post
    Nvm got all errors fixed but I don't get any exp when I hit something?
    aint loading it from combatAssistant obviously.
    Reply With Quote  
     

  10. #10  
    Project-Tenex Developer Uzumaki's Avatar
    Join Date
    Oct 2011
    Posts
    130
    Thanks given
    27
    Thanks received
    6
    Rep Power
    17
    Can you tell me how to do that please?
    Quote Originally Posted by Grim Reaper View Post


    I need help with this..... Does anyone know how to fix this.
    You serious..?
    __________________________________________________ __________________________________________________ _________________________________________
    Quote Originally Posted by SeanQB View Post
    Thanks! And the error in your sig shouldn't matter when compiling. I get the same thing all the time and my files still work.
    Quote Originally Posted by SeanQB View Post
    What's so funny?
    Reply With Quote  
     

Page 1 of 2 12 LastLast

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. EXP Rate Help
    By Phat Hero in forum Help
    Replies: 5
    Last Post: 07-19-2012, 05:38 AM
  2. Exp Rate Help
    By Chatter in forum Help
    Replies: 4
    Last Post: 12-24-2011, 02:20 PM
  3. Exp Rate
    By Infexis in forum Voting
    Replies: 8
    Last Post: 06-01-2011, 07:32 PM
  4. exp rate
    By A la Panda in forum Help
    Replies: 4
    Last Post: 04-11-2009, 11:34 AM
  5. help with exp rate
    By jjman11 in forum Help
    Replies: 0
    Last Post: 08-14-2008, 12:47 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •