Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Getting index bug


    brave

    Recommended Posts

    Posted

    Hello,

    I'm trying to get my local players index (aka chat pid), but it's always returning -1. Does anyone know if this a bug or am I doing it wrong?

     

    Players.localPlayer().getIndex();

     

    Posted

    I think someone else tried to grab the "chat pid" but I don't believe it was the index we have.

    If you really want the index (which again I don't know if it's what you're really looking for) you'd need to use Client#getPlayers and find the local player in there, and that would be the index we have.

    Posted
    32 minutes ago, Pandemic said:

    I think someone else tried to grab the "chat pid" but I don't believe it was the index we have.

    If you really want the index (which again I don't know if it's what you're really looking for) you'd need to use Client#getPlayers and find the local player in there, and that would be the index we have.

    Thank you. 

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.