Thread: Help in compiling error

Results 1 to 6 of 6
  1. #1 Help in compiling error 
    Why are you looking here?


    Join Date
    Jul 2012
    Age
    30
    Posts
    3,214
    Thanks given
    830
    Thanks received
    357
    Rep Power
    559
    So im trying to compile this file playerasssitantr but I dont know how to fix this error

    symbol: variable xp lock
    location: variable c of type client

    symbol: variable jail
    location: variable c of type client
    [15:07:14] sandra vernon: c.xploc


    This is the code

    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;
    }

    and this is the error that I get

    Reply With Quote  
     

  2. #2  
    Registered Member
    Vox''s Avatar
    Join Date
    Nov 2008
    Age
    31
    Posts
    3,113
    Thanks given
    49
    Thanks received
    181
    Rep Power
    731
    You gave the wrong code used.

    Quote Originally Posted by Zirtrix View Post
    So I've recently changed some things in the server, but when i compile it says
    Code:
    source\server\model\players\packets\Commands.java: 58: error: cannot find symbol
    This.Antileech("Remove This Line");
    ^
    Anyone know the problem?
    Student and Developer for http://www.rune-server.org/runescape...pve-based.html
    Reply With Quote  
     

  3. #3  
    Super Donator

    Batukka's Avatar
    Join Date
    Oct 2011
    Posts
    2,433
    Thanks given
    86
    Thanks received
    342
    Rep Power
    496
    client.java add public boolean xplock,jail;
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Jul 2012
    Posts
    48
    Thanks given
    1
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by Vox' View Post
    You gave the wrong code used.
    There was indeed a part of the code missing.

    This is the whole code:



    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  
     

  5. #5  
    Banned
    Join Date
    Oct 2011
    Posts
    860
    Thanks given
    371
    Thanks received
    214
    Rep Power
    0
    Delete the xp lock stuff.... Or rename it to your variable..
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Jul 2012
    Posts
    48
    Thanks given
    1
    Thanks received
    0
    Rep Power
    11
    thanks paradox, that fixed it.
    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. Please help me, compiling error :)
    By frisky in forum Help
    Replies: 3
    Last Post: 08-01-2011, 06:27 AM
  2. Need help with compiling error
    By Port25hackr in forum Help
    Replies: 2
    Last Post: 06-18-2010, 07:26 PM
  3. Error compiling
    By phat josh in forum Help
    Replies: 5
    Last Post: 05-05-2009, 08:10 PM
  4. error while compiling
    By dagron12 in forum Help
    Replies: 0
    Last Post: 02-26-2009, 07:23 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
  •