Thread: 1$ Xp-Lock Error! Rep++ 1$!

Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1 1$ Xp-Lock Error! Rep++ 1$! 
    Banned

    Join Date
    Oct 2009
    Posts
    794
    Thanks given
    128
    Thanks received
    49
    Rep Power
    0
    when i add:
    Code:
    if (expLock) {
        return;
    }
    Under:
    public boolean addSkillXP(int amount, int skill) {

    i get error:
    client.java:5452: missing return value
    return;
    ^
    1 error
    Press any key to continue . . .
     

  2. #2  
    Registered Member
    The Lizard King's Avatar
    Join Date
    Jun 2008
    Posts
    837
    Thanks given
    13
    Thanks received
    12
    Rep Power
    169
    Correct me if im wrong but a boolean is false or true so you should use return false or true?
    Quote Originally Posted by Jim Morrison
    These days, I think you have to be a politician or an assassin to really be a superstar
    Quote Originally Posted by Jim Morrison
    This is the strangest life I've ever known.
    From los angeles california The Doors.
     

  3. #3  
    Banned

    Join Date
    Oct 2009
    Posts
    794
    Thanks given
    128
    Thanks received
    49
    Rep Power
    0
    Where do i write true or false?
     

  4. #4  
    Registered Member
    The Lizard King's Avatar
    Join Date
    Jun 2008
    Posts
    837
    Thanks given
    13
    Thanks received
    12
    Rep Power
    169
    Quote Originally Posted by TheSadx View Post
    Where do i write true or false?
    Code:
    if (expLock) {
        return false;
    }
    or
    Code:
    if (expLock) {
        return true;
    }
    Why don't you use it like this? (this is from a battlescape source so it might not work)

    Code:
    public void addSkillXP(int amount, int skill) {
    		if(!expLock) {
    		int oldLevel = getLevelForXP(playerXP[skill]);
    		playerXP[skill] += amount;
    		int newLevel = getLevelForXP(playerXP[skill]);
    		if (oldLevel < getLevelForXP(playerXP[skill])) {
    			CreatePlayerGfx(199, 0, 100);
    			if (oldLevel < newLevel)
    				playerLevel[skill] = getLevelForXP(playerXP[skill]);
    			LevelUp(skill);
    			if (skill == 3) {
    				updateHp(newLevel - oldLevel, true);
    			}
    			TotalLvl = (getLevelForXP(playerXP[0]) + getLevelForXP(playerXP[1]) + getLevelForXP(playerXP[2]) + getLevelForXP(playerXP[3]) + 	getLevelForXP(playerXP[4]) + getLevelForXP(playerXP[5]) + getLevelForXP(playerXP[6]) + getLevelForXP(playerXP[7]) + getLevelForXP(playerXP[8]) + 	getLevelForXP(playerXP[9]) + getLevelForXP(playerXP[10]) + getLevelForXP(playerXP[0]) + getLevelForXP(playerXP[11]) + getLevelForXP(playerXP[12]) 	+ getLevelForXP(playerXP[13]) + getLevelForXP(playerXP[14]) + getLevelForXP(playerXP[15]) + getLevelForXP(playerXP[16]) + getLevelForXP(playerXP[17]) + getLevelForXP(playerXP[18]) + getLevelForXP(playerXP[19]) + getLevelForXP(playerXP[20]));
    			TotalXP = (playerXP[0] + playerXP[1] + playerXP[2] + playerXP[3] + playerXP[4] + playerXP[5] + playerXP[6] + playerXP[7] + playerXP[8] + playerXP[9] + playerXP[10] + playerXP[0] + playerXP[11] + playerXP[12] + playerXP[13] + playerXP[14] + playerXP[15] + playerXP[16] + playerXP[17] + playerXP[18] + playerXP[19] + playerXP[20]);
    			changeText126("Total Lvl: "+TotalLvl, 3984);
    			changeText126(""+TotalLvl, 149);
    			changeText126(""+combatLevel, 184);
    			updateRequired = true;
    			appearanceUpdateRequired = true;
    		}
    		setSkillLevel(skill);
    		}
    	}
    Stuff in red is what i added.
    Quote Originally Posted by Jim Morrison
    These days, I think you have to be a politician or an assassin to really be a superstar
    Quote Originally Posted by Jim Morrison
    This is the strangest life I've ever known.
    From los angeles california The Doors.
     

  5. #5  
    Banned

    Join Date
    Oct 2009
    Posts
    794
    Thanks given
    128
    Thanks received
    49
    Rep Power
    0
    im going to try this later. using Delta.
     

  6. #6  
    Registered Member
    The Lizard King's Avatar
    Join Date
    Jun 2008
    Posts
    837
    Thanks given
    13
    Thanks received
    12
    Rep Power
    169
    Post you addskillxp method and i fix it
    Quote Originally Posted by Jim Morrison
    These days, I think you have to be a politician or an assassin to really be a superstar
    Quote Originally Posted by Jim Morrison
    This is the strangest life I've ever known.
    From los angeles california The Doors.
     

  7. #7  
    Banned

    Join Date
    Oct 2009
    Posts
    794
    Thanks given
    128
    Thanks received
    49
    Rep Power
    0
    Umm.. where can i find the method? im following this guide:

    http://www.rune-server.org/runescape...activated.html
     

  8. #8  
    Member 1$ Xp-Lock Error! Rep++ 1$! Market Banned


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    35
    Posts
    12,574
    Thanks given
    199
    Thanks received
    7,106
    Rep Power
    5000
    Change return to return false, why it's a boolean in the first place i'll never know.

    Attached imageAttached image
     

  9. #9  
    Banned

    Join Date
    Oct 2009
    Posts
    794
    Thanks given
    128
    Thanks received
    49
    Rep Power
    0
    Did what you sayd and added:

    Code:
    if (command.equalsIgnoreCase("lock")) {
        expLock = true;
        sendMessage("EXP Lock Activated.");
    }
    if (command.equalsIgnoreCase("unlock")) {
        expLock = false;
        sendMessage("EXP Lock De-Activated.");
    }
    got error:

    client.java:7996: cannot find symbol
    symbol : method sendMessage(java.lang.String)
    location: class client
    sendMessage("EXP Lock Activated.");
    ^
    client.java:8000: cannot find symbol
    symbol : method sendMessage(java.lang.String)
    location: class client
    sendMessage("EXP Lock De-Activated.");
    ^
    2 errors
    Press any key to continue . . .
     

  10. #10  
    Donator


    Join Date
    Nov 2008
    Posts
    1,017
    Thanks given
    21
    Thanks received
    32
    Rep Power
    161
    Quote Originally Posted by TheSadx View Post
    Did what you sayd and added:

    Code:
    if (command.equalsIgnoreCase("lock")) {
        expLock = true;
        sendMessage("EXP Lock Activated.");
    }
    if (command.equalsIgnoreCase("unlock")) {
        expLock = false;
        sendMessage("EXP Lock De-Activated.");
    }
    got error:

    client.java:7996: cannot find symbol
    symbol : method sendMessage(java.lang.String)
    location: class client
    sendMessage("EXP Lock Activated.");
    ^
    client.java:8000: cannot find symbol
    symbol : method sendMessage(java.lang.String)
    location: class client
    sendMessage("EXP Lock De-Activated.");
    ^
    2 errors
    Press any key to continue . . .
    Change sendMessage with ur send message method it can be sM
     

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

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