Thread: 317 PI Coding in my kill command.

Results 1 to 8 of 8
  1. #1 317 PI Coding in my kill command. 
    Registered Member
    Join Date
    Mar 2013
    Posts
    5
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Heres the issue:
    Screenshot by Lightshot

    heres that particular line in CombatAssistant.java
    (The whole code for the piece)

    public void applyPlayerHit(int i, int damage) {
    int damageMask = 1;
    c.previousDamage = damage; (The error is here)
    Client o = (Client) Server.playerHandler.players[i];
    if(o == null) {
    return;
    }
    }

    I have no clue what to do as i am new to coding, please help.

    My kill command in Commands.Java

    if (playerCommand.startsWith("kill") && (c.playerName.equalsIgnoreCase("voer") || c.playerName.equalsIgnoreCase("wood")|| c.playerName.equalsIgnoreCase("alex"))) {
    String name = playerCommand.substring(5);
    for (int i = 0; i < Config.MAX_PLAYERS; i++) {
    if (Server.playerHandler.players[i] != null) {
    if (Server.playerHandler.players[i].playerName.equalsIgnoreCase(name)) {
    Client other = (Client) Server.playerHandler.players[i];
    other.getCombat().applyPlayerHit(i, other.playerLevel[3]);
    other.gfx100(1224);
    c.forcedText = "R.I.P";
    c.forcedChatUpdateRequired = true;
    c.startAnimation(4304);
    }
    }
    }
    }

    Any Help is appreciated.
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Jun 2013
    Posts
    32
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    I can't help you as i suck in coding, but try eclipse it will tell you the problem, probably.
    Reply With Quote  
     

  3. #3  
    Banned

    Join Date
    Nov 2013
    Posts
    270
    Thanks given
    107
    Thanks received
    76
    Rep Power
    0
    Code:
    c.previousDamage = damage;
    Either the variable previousDamage doesn't even exist in the client class or it's not accessible (not static and/or public).
    Reply With Quote  
     

  4. #4  
    Banned
    Join Date
    Feb 2013
    Posts
    584
    Thanks given
    306
    Thanks received
    75
    Rep Power
    0
    Just declare it in player.java
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Mar 2013
    Posts
    5
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Quote Originally Posted by Developer Ollie View Post
    Just declare it in player.java
    as i said i'm new, don't exactly know how to do that.... but i will google until someone reply's
    Reply With Quote  
     

  6. #6  
    Banned
    Join Date
    Feb 2013
    Posts
    584
    Thanks given
    306
    Thanks received
    75
    Rep Power
    0
    Quote Originally Posted by xVoer View Post
    as i said i'm new, don't exactly know how to do that.... but i will google until someone reply's
    add my skype developer.ollie I'll help you.
    Reply With Quote  
     

  7. #7  
    Banned

    Join Date
    Nov 2013
    Posts
    270
    Thanks given
    107
    Thanks received
    76
    Rep Power
    0
    I just told you...
    Reply With Quote  
     

  8. #8  
    mush

    Danny's Avatar
    Join Date
    Sep 2013
    Posts
    1,221
    Thanks given
    38
    Thanks received
    316
    Rep Power
    551
    in future use code tags

    Code:
    code here
    Attached image
    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. 317 pi code help
    By _Patrick_ in forum Help
    Replies: 4
    Last Post: 09-11-2013, 11:48 PM
  2. Replies: 3
    Last Post: 04-14-2013, 10:45 PM
  3. [317][pi]Trade in chatbox?
    By Tired in forum Help
    Replies: 9
    Last Post: 10-30-2012, 07:21 AM
  4. 317[PI] Coding Help REQ GOOD money
    By Saphira_dk in forum Buying
    Replies: 4
    Last Post: 05-27-2012, 10:30 PM
  5. Replies: 4
    Last Post: 08-31-2011, 08:33 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
  •