Thread: Cant equip some items

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1 Cant equip some items 
    Registered Member
    Join Date
    Dec 2015
    Posts
    14
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    The title says it all and the console gives this error
    Spoiler for Error:
    java.lang.ArrayIndexOutOfBoundsException: -1
    at server.model.items.ItemAssistant.wearItem(ItemAssi stant.java:1788)
    at server.model.players.packets.WearItem.processPacke t(WearItem.java:76)
    at server.model.players.PacketHandler.processPacket(P acketHandler.java:139)
    at server.model.players.Client.processQueuedPackets(C lient.java:2207)
    at server.model.players.PlayerHandler.process(PlayerH andler.java:169)
    at server.Server.run(Server.java:123)
    at java.util.concurrent.Executors$RunnableAdapter.cal l(Unknown Source)
    at java.util.concurrent.FutureTask.runAndReset(Unknow n Source)
    at java.util.concurrent.ScheduledThreadPoolExecutor$S cheduledFutureTask.access$301(Unknown Source)
    at java.util.concurrent.ScheduledThreadPoolExecutor$S cheduledFutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker( Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Reply With Quote  
     

  2. #2  
    Registered Member
    arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,712
    Thanks given
    170
    Thanks received
    286
    Discord
    Arch337#1337
    Rep Power
    656
    You value is -1 in which you try to input on ItemAssistant.java at line 1788.
    Take a look into it aswell as WearItem.java at line 76.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  3. #3  
    Arix Developer

    Tutus Frutus's Avatar
    Join Date
    Feb 2018
    Posts
    340
    Thanks given
    72
    Thanks received
    176
    Discord
    Tutus Frutus#0001
    Rep Power
    574
    Seems like there is no slot assigned.
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  4. #4  
    Donator

    Join Date
    Aug 2016
    Posts
    13
    Thanks given
    5
    Thanks received
    1
    Rep Power
    9
    Quote Originally Posted by Tutus Frutus View Post
    Seems like there is no slot assigned.
    This.
    Look at your item defs
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Dec 2015
    Posts
    14
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by Symp View Post
    This.
    Look at your item defs
    Itemdef on client side?
    If so this is the item im having trouble with
    case 15848:
    itemDef.modelID = 9575;
    itemDef.name = "Test wepon";
    itemDef.description = "Test wepon";
    itemDef.modelZoom = 720;
    itemDef.modelRotation1 = 699;
    itemDef.modelRotation2 = 0;
    itemDef.modelOffset1 = -5;
    itemDef.modelOffset2 = -5;
    itemDef.maleEquip1 = 9572;
    itemDef.femaleEquip1 = 9572;
    itemDef.groundActions = new String[5];
    itemDef.groundActions[2] = "Take";
    itemDef.actions = new String[5];
    itemDef.actions[1] = "Wear";
    itemDef.actions[4] = "Destroy";
    break;

    Quote Originally Posted by arch337 View Post
    You value is -1 in which you try to input on ItemAssistant.java at line 1788.
    Take a look into it aswell as WearItem.java at line 76.
    ItemAssistant has this on that line
    int toRemove = c.playerEquipment[targetSlot];
    wearitem has this
    c.getItems().wearItem(c.wearId, c.wearSlot);
    Reply With Quote  
     

  6. #6  
    Arix Developer

    Tutus Frutus's Avatar
    Join Date
    Feb 2018
    Posts
    340
    Thanks given
    72
    Thanks received
    176
    Discord
    Tutus Frutus#0001
    Rep Power
    574
    Quote Originally Posted by takanas View Post
    Itemdef on client side?
    If so this is the item im having trouble with
    case 15848:
    itemDef.modelID = 9575;
    itemDef.name = "Test wepon";
    itemDef.description = "Test wepon";
    itemDef.modelZoom = 720;
    itemDef.modelRotation1 = 699;
    itemDef.modelRotation2 = 0;
    itemDef.modelOffset1 = -5;
    itemDef.modelOffset2 = -5;
    itemDef.maleEquip1 = 9572;
    itemDef.femaleEquip1 = 9572;
    itemDef.groundActions = new String[5];
    itemDef.groundActions[2] = "Take";
    itemDef.actions = new String[5];
    itemDef.actions[1] = "Wear";
    itemDef.actions[4] = "Destroy";
    break;


    ItemAssistant has this on that line
    int toRemove = c.playerEquipment[targetSlot];
    wearitem has this
    c.getItems().wearItem(c.wearId, c.wearSlot);
    Add a WearSlot for your item mate
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  7. #7  
    Registered Member
    arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,712
    Thanks given
    170
    Thanks received
    286
    Discord
    Arch337#1337
    Rep Power
    656
    Quote Originally Posted by takanas View Post
    Itemdef on client side?
    If so this is the item im having trouble with
    case 15848:
    itemDef.modelID = 9575;
    itemDef.name = "Test wepon";
    itemDef.description = "Test wepon";
    itemDef.modelZoom = 720;
    itemDef.modelRotation1 = 699;
    itemDef.modelRotation2 = 0;
    itemDef.modelOffset1 = -5;
    itemDef.modelOffset2 = -5;
    itemDef.maleEquip1 = 9572;
    itemDef.femaleEquip1 = 9572;
    itemDef.groundActions = new String[5];
    itemDef.groundActions[2] = "Take";
    itemDef.actions = new String[5];
    itemDef.actions[1] = "Wear";
    itemDef.actions[4] = "Destroy";
    break;


    ItemAssistant has this on that line
    int toRemove = c.playerEquipment[targetSlot];
    wearitem has this
    c.getItems().wearItem(c.wearId, c.wearSlot);
    your targetSlot has value of -1. Make sure to not allow the code to send if it is -1.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  8. #8  
    Registered Member
    Join Date
    Dec 2015
    Posts
    14
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by Tutus Frutus View Post
    Add a WearSlot for your item mate
    Got this in itemassistant
    case 15848:
    targetSlot = 3;
    Reply With Quote  
     

  9. #9  
    Arix Developer

    Tutus Frutus's Avatar
    Join Date
    Feb 2018
    Posts
    340
    Thanks given
    72
    Thanks received
    176
    Discord
    Tutus Frutus#0001
    Rep Power
    574
    Quote Originally Posted by takanas View Post
    Got this in itemassistant
    case 15848:
    targetSlot = 3;
    c.getItems().wearItem(c.wearId, c.wearSlot);
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  10. #10  
    Registered Member Kharyrll.'s Avatar
    Join Date
    Feb 2018
    Posts
    227
    Thanks given
    1
    Thanks received
    20
    Rep Power
    42
    Code:
    c.getItems().wearItem(c.wearId, c.wearSlot);
    need to make sure this is calling for the right slot etc. Had this issue myself once.
    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. (876 matrix) cant equip some items
    By Ikrim in forum Help
    Replies: 0
    Last Post: 03-23-2017, 01:51 AM
  2. Cant spawn some items
    By Aesthetic Brah in forum Help
    Replies: 4
    Last Post: 06-25-2014, 11:54 AM
  3. PI cant wear some items
    By Aim High in forum Help
    Replies: 3
    Last Post: 01-19-2014, 10:43 AM
  4. [718]cant wear some items
    By DatguyJay in forum Help
    Replies: 5
    Last Post: 03-13-2013, 05:13 AM
  5. some items not equiping
    By Lord Stark in forum Help
    Replies: 1
    Last Post: 03-24-2011, 07:00 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
  •