Thread: [PI] Compiling Errors, Will +rep and thank (d)

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1 [PI] Compiling Errors, Will +rep and thank (d) 
    Registered Member
    Join Date
    Jan 2013
    Posts
    135
    Thanks given
    123
    Thanks received
    4
    Rep Power
    11
    Im trying to add d claw special attack with this tutorial. http://www.rune-server.org/runescape...pecial-pi.html
    Im getting 10 errors saying error cannot find symbol previous damage. I may sound like an idiot but i would really appreciate help, im new to coding we've all been there so if somebody could lead me in the right direction that would me much appreciated
    Reply With Quote  
     

  2. #2  
    Registered Member Smoothas's Avatar
    Join Date
    Oct 2013
    Posts
    260
    Thanks given
    28
    Thanks received
    33
    Rep Power
    20
    Can you post the error code please
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jan 2013
    Posts
    135
    Thanks given
    123
    Thanks received
    4
    Rep Power
    11
    Code:
     src\server\game\players\Client.java:472: error: cannot find symbol
                    getCombat().applyNpcMeleeDamage(npcIndex, 1, previousDamage / 2)
    ;
                                                                 ^
      symbol:   variable previousDamage
      location: class Client
    src\server\game\players\Client.java:475: error: cannot find symbol
                    getCombat().applyPlayerMeleeDamage(playerIndex, 1, previousDamag
    e / 2);
                                                                       ^
      symbol:   variable previousDamage
      location: class Client
    src\server\game\players\Client.java:477: error: cannot find symbol
                damage4 = previousDamage % 2;
                          ^
      symbol:   variable previousDamage
      location: class Client
    src\server\game\players\Client.java:479: error: cannot find symbol
                    previousDamage = previousDamage + 1;
                    ^
      symbol:   variable previousDamage
      location: class Client
    src\server\game\players\Client.java:479: error: cannot find symbol
                    previousDamage = previousDamage + 1;
                                     ^
      symbol:   variable previousDamage
      location: class Client
    src\server\game\players\Client.java:483: error: cannot find symbol
                    getCombat().applyNpcMeleeDamage(npcIndex, 2, previousDamage);
                                                                 ^
      symbol:   variable previousDamage
      location: class Client
    src\server\game\players\Client.java:486: error: cannot find symbol
                    getCombat().applyPlayerMeleeDamage(playerIndex, 2, previousDamag
    e);
                                                                       ^
      symbol:   variable previousDamage
      location: class Client
    src\server\game\players\Client.java:490: error: cannot find symbol
                previousDamage = 0;
                ^
      symbol:   variable previousDamage
      location: class Client
    src\server\game\players\combat\CombatAssistant.java:314: error: cannot find symb
    ol
                        applyNpcMeleeDamage(i, 2, c.previousDamage / 2);
                                                   ^
      symbol:   variable previousDamage
      location: variable c of type Client
    src\server\game\players\combat\CombatAssistant.java:1029: error: cannot find sym
    bol
                            applyPlayerMeleeDamage(i, 2, c.previousDamage / 2);
                                                          ^
      symbol:   variable previousDamage
      location: variable c of type Client
    Note: Some input files use unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    10 errors
    Press any key to continue . . .
    Reply With Quote  
     

  4. #4  
    Donator

    Join Date
    Oct 2013
    Posts
    41
    Thanks given
    0
    Thanks received
    3
    Rep Power
    11
    define the variable previousDamage
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Jan 2013
    Posts
    135
    Thanks given
    123
    Thanks received
    4
    Rep Power
    11
    Quote Originally Posted by regulater View Post
    define the variable previousDamage

    Sorry if im asking to be spoonfed but How do i do that?
    Reply With Quote  
     

  6. #6  
    Registered Member Delusional Tacos's Avatar
    Join Date
    Nov 2013
    Posts
    24
    Thanks given
    4
    Thanks received
    5
    Rep Power
    11
    Note: Not sure if this will work 100% since I don't know the base other than that it's PI

    Spoiler for PlayerConstants:
    previousDamage = 0,

    Then add to applyNpcMeleeDamage and applyPlayerMeleeDamage
    Spoiler for CombatAssistant:
    c.previousDamage = damage;
    Last edited by Delusional Tacos; 11-08-2013 at 08:38 AM. Reason: forgot stuff
    Reply With Quote  
     

  7. Thankful user:


  8. #7  
    Registered Member
    Join Date
    Jan 2013
    Posts
    135
    Thanks given
    123
    Thanks received
    4
    Rep Power
    11
    Yeah i already solved it but thanks anyways , ur right btw all i did was add it in player.java , however the special attack bar for my dragon claws doesnt show up so i cant test if the spec works, anybody know how to add special attack bar? i tried adding it in itemassistant but its not working. Im gonna try to find a tutorial on it if anybody could help me that would be great.
    Reply With Quote  
     

  9. #8  
    Registered Member Delusional Tacos's Avatar
    Join Date
    Nov 2013
    Posts
    24
    Thanks given
    4
    Thanks received
    5
    Rep Power
    11
    Add this under sendWeapon
    Spoiler for ItemAssistant:
    } else if (c.playerEquipment[c.playerWeapon] == 14484) {
    c.setSidebarInterface(0, 7762); //claws
    c.getPA().sendFrame246(7763, 200, Weapon);
    c.getPA().sendFrame126(WeaponName, 7765);
    }

    Then add this under a break as "case 14484:"
    Spoiler for CombatAssistant:
    case 14484:
    c.gfx0(1950);
    c.startAnimation(10961);
    c.specAccuracy = 9.9;
    c.clawDamage = 0;
    c.specDamage = 1.10;

    if (c.playerIndex > 0) {
    Client o = (Client) Server.playerHandler.players[c.playerIndex];
    if (Misc.random(calculateMeleeAttack()) > Misc.random(o.getCombat().calculateMeleeDefence()) ) {
    c.clawDamage = Misc.random(calculateMeleeMaxHit() + 5);
    } else {
    c.clawDamage = Misc.random(calculateMeleeMaxHit() + 5);
    }
    c.clawIndex = c.playerIndex;
    c.clawType = 1;
    } else if (c.npcIndex > 0) {
    NPC n = Server.npcHandler.npcs[c.npcIndex];
    if (Misc.random(calculateMeleeAttack()) > Misc.random(n.defence)) {
    c.clawDamage = Misc.random(calculateMeleeMaxHit() + Misc.random(6));
    } else {
    c.clawDamage = Misc.random(calculateMeleeMaxHit() /2);
    }
    c.clawIndex = c.npcIndex;
    c.clawType = 2;
    }

    c.doubleHit = true;
    c.usingClaws = true;
    c.specEffect = 5;
    c.hitDelay = getHitDelay(c.getItems().getItemName(c.playerEquip ment[c.playerWeapon]).toLowerCase());
    break;
    Reply With Quote  
     

  10. Thankful user:


  11. #9  
    Registered Member
    Join Date
    Jan 2013
    Posts
    135
    Thanks given
    123
    Thanks received
    4
    Rep Power
    11
    Quote Originally Posted by Delusional Tacos View Post
    Add this under sendWeapon
    Spoiler for ItemAssistant:
    } else if (c.playerEquipment[c.playerWeapon] == 14484) {
    c.setSidebarInterface(0, 7762); //claws
    c.getPA().sendFrame246(7763, 200, Weapon);
    c.getPA().sendFrame126(WeaponName, 7765);
    }

    Then add this under a break as "case 14484:"
    Spoiler for CombatAssistant:
    case 14484:
    c.gfx0(1950);
    c.startAnimation(10961);
    c.specAccuracy = 9.9;
    c.clawDamage = 0;
    c.specDamage = 1.10;

    if (c.playerIndex > 0) {
    Client o = (Client) Server.playerHandler.players[c.playerIndex];
    if (Misc.random(calculateMeleeAttack()) > Misc.random(o.getCombat().calculateMeleeDefence()) ) {
    c.clawDamage = Misc.random(calculateMeleeMaxHit() + 5);
    } else {
    c.clawDamage = Misc.random(calculateMeleeMaxHit() + 5);
    }
    c.clawIndex = c.playerIndex;
    c.clawType = 1;
    } else if (c.npcIndex > 0) {
    NPC n = Server.npcHandler.npcs[c.npcIndex];
    if (Misc.random(calculateMeleeAttack()) > Misc.random(n.defence)) {
    c.clawDamage = Misc.random(calculateMeleeMaxHit() + Misc.random(6));
    } else {
    c.clawDamage = Misc.random(calculateMeleeMaxHit() /2);
    }
    c.clawIndex = c.npcIndex;
    c.clawType = 2;
    }

    c.doubleHit = true;
    c.usingClaws = true;
    c.specEffect = 5;
    c.hitDelay = getHitDelay(c.getItems().getItemName(c.playerEquip ment[c.playerWeapon]).toLowerCase());
    break;
    Alright im getting somewhere now . Now theres a spec bar and the right interface for claws , but i cant click the spec bar. It doesnt do anything, not even glow yellow.
    Any ideas? Btw i didnt put in all that stuff for combatassistant, it gave me a bunch of errors so i followed the tutorial i use and added the top part of yours
    Heres my combatassistant
    Code:
     case 14484:
    			c.gfx0(1950);
    			c.startAnimation(10961);
    			c.doubleHit = true;
                c.usingClaws = true;
                c.specEffect = 5;
    			c.specAccuracy = 9.9;
    			c.specDamage = 1.10;
    			c.hitDelay = getHitDelay(c.getItems().getItemName(c.playerEquipment[c.playerWeapon]).toLowerCase());
    			break;
    Reply With Quote  
     

  12. #10  
    Registered Member Delusional Tacos's Avatar
    Join Date
    Nov 2013
    Posts
    24
    Thanks given
    4
    Thanks received
    5
    Rep Power
    11
    You still need to add it to use a special, look for 4151 again, it should be somewhere along the lines of
    if (c.specAmount >= 5)
    Just add case 14484: under the other cases to make it 50% special
    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. Compiling Error. will rep and Thank
    By krisnka in forum Help
    Replies: 1
    Last Post: 08-08-2012, 01:41 AM
  2. [PI] Running Error will +rep and thank!
    By AddictivePkz in forum Help
    Replies: 2
    Last Post: 08-05-2012, 08:02 AM
  3. Compile Error ( Will Rep+ and thank )
    By Phat Stacks in forum Help
    Replies: 1
    Last Post: 02-27-2012, 04:10 AM
  4. [PI] A few errors (will rep and thank)
    By RS2006Phat in forum Help
    Replies: 7
    Last Post: 02-08-2012, 07:59 PM
  5. [pi] hitting pobelm, will rep and thank
    By Insidia X in forum Help
    Replies: 1
    Last Post: 11-14-2011, 01:50 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
  •