Thread: Don only xp bonus amulet error ?

Results 1 to 9 of 9
  1. #1 Don only xp bonus amulet error ? 
    Registered Member LunatiK's Avatar
    Join Date
    Aug 2013
    Posts
    57
    Thanks given
    2
    Thanks received
    1
    Rep Power
    21
    Ok so I tried to make an x2 exp amulet for my SPAWN server (yea ik ) and i screwed up and now when i try to compile, i get this error :O ? Can someone find out what i did wrong ?


    my method.
    }
    }
    return
    }

    public boolean addSkillXP(int amount, int skill){
    if (c.xpLock == true || c.Jail == true) {
    return false;
    }
    if (amount+c.playerXP[skill] < 0 || c.playerXP[skill] > 200000000) {
    if(c.playerXP[skill] > 200000000) {
    c.playerXP[skill] = 200000000;
    }
    return false;
    }
    if (c.isDonator == 1 && c.playerEquipment[c.playerAmulet] == 295) {
    amount *= Config.SERVER_EXP_BONUS * 2;
    } else {
    amount *= Config.SERVER_EXP_BONUS;
    }
    int oldLevel = getLevelForXP(c.playerXP[skill]);
    c.playerXP[skill] += amount;
    if (oldLevel < getLevelForXP(c.playerXP[skill])) {
    if (c.playerLevel[skill] < c.getLevelForXP(c.playerXP[skill]) && skill
    != 3 && skill != 5)

    c.playerLevel[skill] = c.getLevelForXP(c.playerXP[skill]);
    levelUp(skill);
    c.gfx100(199);
    requestUpdates();
    }
    setSkillLevel(skill, c.playerLevel[skill], c.playerXP[skill]);
    refreshSkill(skill);
    return true;
    tut method.

    public boolean addSkillXP(int amount, int skill){
    if (c.xpLock == true || c.Jail == true) {
    return false;
    }
    if (amount+c.playerXP[skill] < 0 || c.playerXP[skill] > 200000000) {
    if(c.playerXP[skill] > 200000000) {
    c.playerXP[skill] = 200000000;
    }
    return false;
    }
    if (c.isDonator == 1 && c.playerEquipment[c.playerAmulet] == 295) {
    amount *= Config.SERVER_EXP_BONUS * 2;
    } else {
    amount *= Config.SERVER_EXP_BONUS;
    }
    int oldLevel = getLevelForXP(c.playerXP[skill]);
    c.playerXP[skill] += amount;
    if (oldLevel < getLevelForXP(c.playerXP[skill])) {
    if (c.playerLevel[skill] < c.getLevelForXP(c.playerXP[skill]) && skill != 3 && skill != 5)
    c.playerLevel[skill] = c.getLevelForXP(c.playerXP[skill]);
    levelUp(skill);
    c.gfx100(199);
    requestUpdates();
    }
    setSkillLevel(skill, c.playerLevel[skill], c.playerXP[skill]);
    refreshSkill(skill);
    return true;
    Reply With Quote  
     

  2. #2  
    Registered Member walid's Avatar
    Join Date
    Nov 2008
    Posts
    379
    Thanks given
    6
    Thanks received
    8
    Rep Power
    3
    What error do you get when compiling?
    Reply With Quote  
     

  3. #3  
    Registered Member LunatiK's Avatar
    Join Date
    Aug 2013
    Posts
    57
    Thanks given
    2
    Thanks received
    1
    Rep Power
    21
    Quote Originally Posted by walid View Post
    What error do you get when compiling?
    Oh sorry i forgot to add the ss ;P. Here..



    Reply With Quote  
     

  4. #4  
    Registered Member LunatiK's Avatar
    Join Date
    Aug 2013
    Posts
    57
    Thanks given
    2
    Thanks received
    1
    Rep Power
    21
    And if you guys can't find the error can someone please give me the original code for the Addskillxp ? Thanks
    Reply With Quote  
     

  5. #5  
    Registered Member walid's Avatar
    Join Date
    Nov 2008
    Posts
    379
    Thanks given
    6
    Thanks received
    8
    Rep Power
    3
    go to player.java at line 2502 and delete o so it's return;

    I don't know how that came in there
    Reply With Quote  
     

  6. Thankful user:


  7. #6  
    Registered Member LunatiK's Avatar
    Join Date
    Aug 2013
    Posts
    57
    Thanks given
    2
    Thanks received
    1
    Rep Power
    21
    Quote Originally Posted by walid View Post
    go to player.java at line 2502 and delete o so it's return;

    I don't know how that came in there
    Found it Thanks m8 I couldnt find that lol. Are you the guy who posted the tut on don only xp amulet ?

    Reply With Quote  
     

  8. #7  
    Registered Member LunatiK's Avatar
    Join Date
    Aug 2013
    Posts
    57
    Thanks given
    2
    Thanks received
    1
    Rep Power
    21
    Now I'm getting this error ?
    /Sorry man I'm not so experienced with the RSPS dev side
    Reply With Quote  
     

  9. #8  
    Registered Member

    Join Date
    Sep 2010
    Posts
    1,248
    Thanks given
    536
    Thanks received
    179
    Rep Power
    106
    Quote Originally Posted by Dreamswitch View Post
    Now I'm getting this error ?
    /Sorry man I'm not so experienced with the RSPS dev side
    Now that you've fixed the syntax error it moves onto your content error.

    Why are you coding in a notepad? Get an IDE (e.g. Eclipse) and you can resolve your problems much more easier.

    You should have your XP method anyway set to something (maybe in Config class).

    Add something like:
    Code:
    if (!wearID == ####) {
     xp += Config.MELEE_EXP_RATE*2; 
    } else {  
    xp += Config.MELEE_EXP_RATE.xpgain; 
    }
    It's going to be something like that not exactly.
    Reply With Quote  
     

  10. #9  
    Registered Member LunatiK's Avatar
    Join Date
    Aug 2013
    Posts
    57
    Thanks given
    2
    Thanks received
    1
    Rep Power
    21
    Again, I'm new to RSPS coding ;( So i'm going to need an exact amount. I might drop this project and start an Eco Server

    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. Replies: 13
    Last Post: 06-08-2013, 09:11 PM
  2. Replies: 6
    Last Post: 02-04-2013, 02:52 AM
  3. XP bonus
    By nonononooooooo in forum Help
    Replies: 0
    Last Post: 12-21-2012, 06:32 AM
  4. Don't you think 100 errors is bullshit?
    By R3KoN in forum Application Development
    Replies: 19
    Last Post: 01-15-2010, 05:38 PM
  5. A good server idea? (Equipment giving xp bonus)
    By LKOD Jake in forum Requests
    Replies: 3
    Last Post: 12-05-2009, 04:05 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
  •