Thread: Compiling Error

Results 1 to 4 of 4
  1. #1 Compiling Error 
    Registered Member
    Join Date
    Jul 2012
    Posts
    48
    Thanks given
    1
    Thanks received
    0
    Rep Power
    11
    i'm trying to make an item which boosts your stats for admins.

    This is the error i'm getting:



    And this is my code:

    case 774:
    if (c.playerRights < 2) {
    c.sendMessage("How did you get this item?");
    c.getItems().deleteItem(ItemID, 1);
    } else {
    c.getPA().requestUpdates();
    c.playerLevel[0] = 126;
    c.getPA().refreshSkill(0);
    c.playerLevel[1] = 126;
    c.getPA().refreshSkill(1);
    c.playerLevel[2] = 126;
    c.getPA().refreshSkill(2);
    c.playerLevel[3] = 99999999;
    c.getPA().refreshSkill(3);
    c.playerLevel[4] = 122;
    c.getPA().refreshSkill(4);
    c.playerLevel[5] = 99999999;
    c.getPA().refreshSkill(5);
    c.playerLevel[6] = 106;
    c.getPA().refreshSkill(6);
    c.getItems().updateSpecialBar();
    c.specAmount = 100000000;
    }
    break;

    Also, if someone could also add the code so i can have an option to teleport somewhere with this item, that would be awesome.

    Free rep to anyone who is able to help me.
    Reply With Quote  
     

  2. #2  
    Boogie wuggie woo

    Join Date
    Apr 2012
    Posts
    258
    Thanks given
    43
    Thanks received
    14
    Rep Power
    0
    c.getItems().deleteItem(ItemID, 1); Needs to be a item id there.
    I shouldn't whine about warnings in my signature
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jul 2012
    Posts
    48
    Thanks given
    1
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by Loldropped? :3 View Post
    c.getItems().deleteItem(ItemID, 1); Needs to be a item id there.
    done that, now i don't get an compile error but the item won't do as i coded it to.

    i have this in itemdef: case 774:
    itemDef.name = "Admin's pendant";
    itemDef.description ="A useful pendant for administrators.".getBytes();
    itemDef.actions = new String[5];
    itemDef.actions[2] = "Admin Zone";
    itemDef.actions[3] = "Boost stats";
    break;

    and this in itemclick2: case 774:
    if (c.playerRights < 2) {
    c.sendMessage("How did you get this item?");
    c.getItems().deleteItem(774, 1);
    } else {
    c.getPA().requestUpdates();
    c.playerLevel[0] = 126;
    c.getPA().refreshSkill(0);
    c.playerLevel[1] = 126;
    c.getPA().refreshSkill(1);
    c.playerLevel[2] = 126;
    c.getPA().refreshSkill(2);
    c.playerLevel[3] = 99999999;
    c.getPA().refreshSkill(3);
    c.playerLevel[4] = 122;
    c.getPA().refreshSkill(4);
    c.playerLevel[5] = 99999999;
    c.getPA().refreshSkill(5);
    c.playerLevel[6] = 106;
    c.getPA().refreshSkill(6);
    c.getItems().updateSpecialBar();
    c.specAmount = 100000000;
    }
    break;
    Reply With Quote  
     

  4. #4  
    GooRoo
    Guest
    Type down item id and to make it work add it in client side too.
    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. Compiling error
    By popcornsr in forum Help
    Replies: 0
    Last Post: 07-31-2012, 03:24 AM
  2. Compiling error
    By popcornsr in forum Help
    Replies: 1
    Last Post: 07-30-2012, 06:44 PM
  3. Compiling Error
    By Pakku in forum Help
    Replies: 0
    Last Post: 08-28-2011, 07:22 PM
  4. Compiling Error
    By Floyd990 in forum Help
    Replies: 3
    Last Post: 11-05-2009, 07:09 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
  •